bug-or-feature / pysystemtrade-fsb

Systematic spread betting in Python
https://pysystemtrade-fsb.bugorfeature.net/
GNU General Public License v3.0
10 stars 2 forks source link

Improve price data capture #13

Closed bug-or-feature closed 2 years ago

bug-or-feature commented 2 years ago

Currently, futures contract prices are scraped from Barchart and massaged dynamically on the fly into the numeric format offered by IG, where required. This works fine, and is relatively simple, but is not the best possible solution

A better way to do it would be to store the actual futures contract prices as you would in a normal vanilla futures system. You would have a new process that copies those futures contract prices into FSB prices, massaging them where necessary. Multiple and adjusted prices are not generated for futures, only FSBs. Using this model means It would be much simpler to move to futures trading at a later time. It would also mean it would be relatively easy to introduce other derived type instruments, eg CFDs based on futures.

There is a complexity cost of course; but worthwhile I think in the long run.

bug-or-feature commented 2 years ago

Completed by commit ad848f0d