I want to backtest some data, I would like the output of my backtest and analysis to be an input into the decisions of my application.
I thought about duplicating a model/table and for the purposes of performing my backtest and analysis, but then I would be doubling my workload and isn't particularly scalable.
Is it possible to dynamically toggle the rails environment for particular a particular class? I.e. create a BacktestingService class, any database read/writes are done to a 'test' database whilst the rest of the app continues to use development/production environment?
Can you suggest any other solutions for my use case?