Created
July 22, 2019 22:00
-
-
Save mementum/e44671439986da352ec5defe08958914 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetPayOutData(bt.feeds.GenericCSVData): | |
lines = ('npy',) # add a line containing the net payout yield | |
params = dict( | |
npy=6, # npy field is in the 6th column (0 based index) | |
dtformat='%Y-%m-%d', # fix date format a yyyy-mm-dd | |
timeframe=bt.TimeFrame.Months, # fixed the timeframe | |
openinterest=-1, # -1 indicates there is no openinterest field | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment