xKDR / TSFrames.jl

Timeseries in Julia
MIT License
92 stars 22 forks source link

Fixing `pctchange`. #106

Closed codetalker7 closed 1 year ago

codetalker7 commented 1 year ago

This fix addresses https://github.com/xKDR/TSx.jl/issues/105. We have changed the formula for pctchange to use an absolute value in the denominator. Also modified the test for pctchange to reflect this change.

chiraganand commented 1 year ago

Are we not taking the percentage by multiplying by 100? What do other languages do?

codetalker7 commented 1 year ago

Are we not taking the percentage by multiplying by 100? What do other languages do?

TimeSeries.jl doesn't multiply by 100: https://juliastats.org/TimeSeries.jl/stable/apply/#percentchange-1

Also, won't it be fine to leave it to the users to multiply by 100?

chiraganand commented 1 year ago

TimeSeries.jl doesn't multiply by 100: https://juliastats.org/TimeSeries.jl/stable/apply/#percentchange-1

Also, won't it be fine to leave it to the users to multiply by 100?

Yes, makes sense.