-
Notifications
You must be signed in to change notification settings - Fork 70
Updated to Python 3 and latest package versions #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: loss2 <[email protected]>
updated readme and contact info Signed-off-by: loss2 <[email protected]>
| @@ -0,0 +1,15 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,14 @@ | |||
| <component name="InspectionProjectProfileManager"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,86 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,3 @@ | |||
| <component name="MarkdownNavigator.ProfileManager"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,27 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,8 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| @@ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was probably added before .gitignore was modified. .idea folder should be removed from the repository.
| def run_backtest(self): | ||
| self.ibhft = bt.Backtester() | ||
| self.ibhft.set_csv_file("ticks 10 mins - Jun 25 2014.csv") | ||
| self.ibhft.set_csv_file("C:\\Users\\jloss\\PyCharmProjects\\IB-Trading-Models-And-Backtester\\src\\ticks 10 mins - Jun 25 2014.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be reverted so that it works with relative path (absolute path will work only on the authors computer)
| tkinter.Label(self.tk, textvariable=label).grid(row=row, column=1) | ||
| row += 1 | ||
| return row | ||
| return row_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably return the row and not row_index. row_index is not used in this function
| self.ibhft = bt.Backtester() | ||
| self.ibhft.set_csv_file("ticks 10 mins - Jun 25 2014.csv") | ||
| self.ibhft = Backtester() | ||
| self.ibhft.set_csv_file("C:\\Users\\jloss\\PyCharmProjects\\IB-Trading-Models-And-Backtester\\src\\ticks 10 mins - Jun 25 2014.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be reverted so that it works with relative path (absolute path will work only on the authors computer)
| def run_backtest(self): | ||
| def setup_bootstrap_conditions(): | ||
| self.pd_last_prices = pd.read_csv("ticks 10 mins - Jun 25 2014.csv") | ||
| self.pd_last_prices = pd.read_csv("C:\\Users\\jloss\\PyCharmProjects\\IB-Trading-Models-And-Backtester\\src\\ticks 10 mins - Jun 25 2014.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be reverted so that it works with relative path (absolute path will work only on the authors computer)
| self.ibhft = bt.Backtester() | ||
| self.ibhft.set_csv_file("ticks 10 mins - Jun 25 2014.csv") | ||
| self.ibhft = Backtester() | ||
| self.ibhft.set_csv_file("C:\\Users\\jloss\\PyCharmProjects\\IB-Trading-Models-And-Backtester\\src\\ticks 10 mins - Jun 25 2014.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be reverted so that it works with relative path (absolute path will work only on the authors computer)
sasasaftic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some critical changes required (using relative path vs absolute path). I also believe there is a bug in return statement of the function (comment on the line code).
Updated source code to Python 3 and the latest versions of pandas, ibpy2, and the ibapi.
Code runs as expected for the most part, except for the Strat-Pairs model. I will update with issue tickets over the weekend.