For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Fundamental Data
-
I have fundamental data (say stock P/E time series) saved as a dataframe. How should I input and use it in backtrader? I load the dataframe using bt.feeds.PandasData and put "close" = "PE?
-
It is not clear what format are you going to use for your fundamental data. But check the following link - P/E was added -
-
Thank you. The fundamental data is in pandas dataframe format.
Yes, adding a line and use it through method data.pe is what I need.
What if I already have dataframe as hand, instead of a CSV file? -
Extend the
PandasData
feed instead.See here for example: https://community.backtrader.com/topic/158/how-to-feed-backtrader-alternative-data/5