Skip to content

Conversation

@chicago-joe
Copy link

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.

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>

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">

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"?>

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">

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"?>

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"?>

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"?>

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")

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

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")

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")

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")

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)

Copy link

@sasasaftic sasasaftic left a 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants