stockparfait / experiments

Statistical experiments with financial data
Apache License 2.0
0 stars 0 forks source link

Implement simulator experiment #132

Open sergey-a-berezin opened 1 year ago

sergey-a-berezin commented 1 year ago

Implement a simulator of various trading and investing strategies both on real and synthetic data. As such, it can be used both as a backtest and as a Monte-Carlo simulator.

In any case, the idea is to run simulations on a lot of data for a lot of possible scenarios or real tickers and perform statistical analysis of the result. The very first such analysis is simply to plot a distribution of the (log-)profit of the strategy.

Later, such simulation can be done using varying strategy parameters and plotting the results (e.g. the average expected growth, volatility, survivability, etc.) as a function of the parameters, and in particular, finding the best combination according to some criteria (e.g. maximizing expected profit or survivability).

sergey-a-berezin commented 1 year ago

Each specific strategy must be debuggable. Therefore, it should be able to (optionally, to save CPU & RAM) return a detailed sequence of transactions (buy, sell, how much each time), so at the very least it can be tested, and ideally plotted on a graph as a sample run for the user.