Hacker News new | past | comments | ask | show | jobs | submit login
Zack: A Simple Backtesting Engine in Zig (github.com/zerotech-studio)
73 points by sksxihve 12 hours ago | hide | past | favorite | 5 comments





Interesting. This looks like just the thing to try out Zig. Where can I get historical data to try this on? Are there data sets that are pretty recent? I’d like to get a few months of data but right until yesterday.


I was actually revoking my hobby site for backtesting and casually developing it these days (indicatorinsights.co). Just saw this, very interesting work!

It's still not clear to me that past data has any information about future prices or that repeating trends appear with any statistical significance. Especially major indexes that aggregate lots of equities. It's not clear if they ever did and if they did if they still do now that everything is electronic and very fast. I understand there are studies showing momentum phenomena, etc. Maybe there would be if Renaissance Technologies and these other gigachad companies didn't exist, but they do.

I understand that "stocks in play" (boomer slang for meme stocks) display whacky irrational behavior that makes no sense, or there is just a temporary combination of high volatility at relatively low market cap, and therein lies potential profit opportunities. It's not clear whether an algorithmic trading strategy is applicable to such situations although I do see people always mention "stock screeners" which seems to just be code to filter time series.

After taking into account transaction costs, slippage and taxes, it's not clear that there is anything better to do than buy and hold low-cost index funds.

Also, there is a separate problem around having the computer structure/segment large trades to reduce market impact to get the best deal possible by looking at the order book to wait for people willing to buy/sell a lot at reasonable prices or something -- that is a different kind of algorithmic trading from what most people mean when they say they are backtesting a trading strategy like moving average crossover or something.

It all just feels too much like alchemy. But, if you become independently wealthy by writing code or you just don't lose a lot of money and you find it fun so it's sort of like paying to do something you enjoy, God bless.


it's not clear that there is anything better to do than buy and hold low-cost index funds.

Sure, 100%. The growth of this strategy has limitations though. Check out Mike Green's interviews on Youtube about the growth of passive investments post 2008 as a source of systemic volatility.

Though I can't tell if this project supports it, how do you feel about non-stock price indicators? Things like housing starts, gas prices, or various constructions of a "Walmart indicator"?




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: