I'd read up on the Uniswap constant product invariant (xy=k) and consider reading the Uniswap v2 code (it's a pleasure to read) [0].
Then check out the StableSwap paper by Curve founder Michael Egorov [1]
Finally if you want a well-documented implementation to read in Solidity, check out Saddle [2]. Disclaimer, I helped write the first iteration.
[0] https://github.com/Uniswap/v2-core [1] https://curve.fi/files/stableswap-paper.pdf [2] https://github.com/saddle-finance/saddle-contract/blob/maste...
Not sure why you mention backtesting, or how that would really apply.
Backtesting is relevant because there was no stability analysis, no simulated long drawn out bearmarket, no adversarial probing. Just some minimal quant sugar to make the new gambling opportunity go down with the suckers.
In real finance, you have much more sophisticated and diversified trading algorithms babysitted and regulated for stability, with much higher effective decentralisation and control since different HFT funds are legally barred from conspiring against the traders. Oh, and much lower fees as well.
HN is better than this.
Remember that "conservative" in finance means not taking risks, rather than the current political meaning of "right wing authoritarian".