Skip to content
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

Not placing orders #5

Open
codeguru1983 opened this issue Dec 20, 2019 · 0 comments
Open

Not placing orders #5

codeguru1983 opened this issue Dec 20, 2019 · 0 comments

Comments

@codeguru1983
Copy link

Hi,

I've been testing your solution for a couple of days now, and although I think it might be a great tool for trading, it seems that I can't get it right....

First of all it barely gets a Beta under 1 to trade, and when it does in most cases will be this neutral felling to it.

If somehow will get into action and actually place a trade

p_value: 0.08963013915151219
Beta: [0.35512627]
NEUTRAL - Current holding: 0
Minute update...
Ready to analyze history...
EUR_JPY
C1: 1199
TS: 2019-12-17 21:17:00  /TE: 2019-12-18 18:56:00
GBP_JPY
C2: 1199
TS: 2019-12-17 22:56:00  /TE: 2019-12-18 18:56:00
X: 1201
Y: 1201
p_value: 0.09087981597641864
Beta: [0.35396983]
NEUTRAL - Current holding: 0
Minute update...
Ready to analyze history...
EUR_JPY
C1: 1199
TS: 2019-12-17 21:21:00  /TE: 2019-12-18 18:57:00
GBP_JPY
C2: 1199
TS: 2019-12-17 23:00:00  /TE: 2019-12-18 18:59:00
X: 1198
Y: 1198
p_value: 0.09444624003182783
Beta: [0.34829104]
Traceback (most recent call last):
  File "Trading_Model.py", line 250, in <module>
    EG_Test.process_trading(index=j, transaction_cost=0.000, **action_dict)
  File "/home/ftpuser/ml/STRATEGY/Cointegration.py", line 495, in process_trading
    order = self.gen_trade_signal(start_forward, end_forward, trade_th, stop_loss, transaction_cost)
  File "/home/ftpuser/ml/STRATEGY/Cointegration.py", line 204, in gen_trade_signal
    x, y = self.get_trade_sample(start, end)
  File "/home/ftpuser/ml/STRATEGY/Cointegration.py", line 133, in get_trade_sample
    assert start < end <= len(self.x), 'Error:Invalid Indexing.'
AssertionError: Error:Invalid Indexing.

I'm not sure if I do something wrong...

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

No branches or pull requests

1 participant