robcarver17 / pysystemtrade

Systematic Trading in python
GNU General Public License v3.0
2.49k stars 798 forks source link

Euribor Data triggering weird results #1349

Closed craigmediaservices closed 3 months ago

craigmediaservices commented 3 months ago

The Euribor dataset is triggering some weird results I couldn't pin down. It's showing unusually large losses on all trading rules, along with an unusual return dispersion (only negative). Plotting the daily price data though looks normal, so I have no clue!

All instruments: image

Euribor: image

No rules at all work: image

craigmediaservices commented 3 months ago

Ethanol actually behaves the same way, except it had a couple individual positive days in a couple rules - but the return dispersion looks extremely odd.

robcarver17 commented 3 months ago

Both have very high costs. Compare and contrast:

system.accounts.pandl_for_instrument_forecast('EURIBOR', 'breakout80').gross.cumsum().plot() system.accounts.pandl_for_instrument_forecast('EURIBOR', 'breakout80').net.cumsum().plot()

robcarver17 commented 3 months ago

I just checked the spread costs for EURIBOR and they are too high by a factor of 4 - I've just updated the spread costs. But this would still be far too expensive to trade. ETHANOL has zero volume so I'm not sampling any spreads.

craigmediaservices commented 3 months ago

Thank you very much for explaining what was happening. I'm very slowly making my way through your system after (also very slowly) reading the books. I apologize for not putting 2 and 2 together!

I see your bad_markets list and instrument report is how this is dealt with.