Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish this was better, but honestly, I'm just hard coding them right into the BUY loop. So, I need to restart the app anytime I want to change something. That's why I build this logic to dump and reload the state into a gob file (go memory dump essentially). Ideally, you'd have some type of format to write out your algorithm, and then have a way of hot loading it or something. But, I don't change these enough to really do that yet.

For back testing, I download all raw trades and quotes, and put them into 1 file sorted by time (1 file per day). Then, I compress them using lz4. This allows me to sort of replay the entire market and build up all my intraday backtesting from the source. This took me a long time to figure out and build but has been so worth it. So, I have an off-line script that basically, loops through these files, and replays the market, and makes simulated trades, and then spits out what would have happened. There is a GUI for that too so you can go in an explore the trades and see what triggered the buy and sell. I have seen nothing that goes backtesting for intraday like this.

This is super inefficient but I'm just building the aggregates on the fly. I could probably cache them somewhere but it takes maybe 4-5 minutes to replay a days worth of trades/quotes and build all this so I haven't bothered yet.



Fascinating. Have you considered open sourcing this without your algorithms ( empty buy/ sell loops)?

I’d like to play with something like this but I couldn’t be bothered to build it all from scratch.


Yeah, I can do that. Ping me at [redacted] and I'll send you a note when I've done it.


Count me in the group of solo algo trading developers (Go and Python and Tradingview Pinescript and other sruff). Planning to send you an email but maybe we can form a group/discord or something online.


Do count me in as well! Literally in the middle of building something like this myself.

I've also got a few questions regarding the way you manage memory, so I might ask you a couple !


sign me up as well! I would def be interested too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: