pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.96k stars 294 forks source link

Starting with returns. #68

Closed csc5a2g closed 5 years ago

csc5a2g commented 5 years ago

Hi All,

Having looked at FFN I'm keen to try it out to see the performance statistics of my trading strategy, however it looks like the I can only start with prices rather than returns.

How can I use FFN with the returns from my trading strategy (a basic example would be amazing) ?

D

svenissimo commented 5 years ago

I'm just a lurker here but if you have Arithmetic Returns you can just use the following and supply a starting price(although that won't really matter) http://pmorissette.github.io/ffn/ffn.html#ffn.core.to_price_index

if you are supplying log returns then I can't really help but imagine it involves the inverse of 'log'

csc5a2g commented 5 years ago

Thank svenissimo. Sorted.