pmorissette / bt

bt - flexible backtesting for Python
http://pmorissette.github.io/bt
MIT License
2.19k stars 420 forks source link

Not an issue - just a question. #108

Closed jaredpohl closed 7 years ago

jaredpohl commented 7 years ago

Hello,

wondering if your backtester supports loading data from a csv file.. if i wanted to load my own dataset, what would the format be for the file and how would i set it to be a csv??

thanks!

eurekar commented 7 years ago

Same question here. Thanks!

pmorissette commented 7 years ago

Hi both,

Yes this is done via the pandas library. Check out the docs for that package. Basically, you would swap out data = bt.get(...) for data = pandas.read_csv(...) in the examples.

Hope this helps, Phil

jaredpohl commented 7 years ago

Thank you ! That helps immensely.

I was wondering if it was possible to get pointed in a direction by you.. I'm trying to learn some quant strategies and am trying to - as a way of learning - recreate the Fama French factors.

I was wondering if you had any example code or suggestions on how to implement it. I've been thinking about it for a while now and am coming up stuck in a few areas on your code base.

Perhaps even some pseudo code to go away and work on it after.

Thank you