gs-quant icon indicating copy to clipboard operation
gs-quant copied to clipboard

WIP: Backtest Module

Open gavriv opened this issue 6 years ago • 1 comments

Describe the problem. This is a feature proposal to add a first version of the backtest module in gs_quant. This module is a work-in-progress and would continue to improve over the coming months.

Describe the solution you'd like For the first working version of the backtest module, we wanted to support backtesting for systematic strategies on Equity Options. By systematic strategy, we refer to non-event based strategies where the strategy gets into a well defined portfolio every day, optionally hedges the delta risk and roll positions in the portfolio after a fixed time.

Example code snippet would be as following

underlierList = [
EqOption("SPX", "3m", 3000, OptionType.Call, OptionStyle.European),
EqOption("SPX", "3m", 3000, OptionType.Put, OptionStyle.European)
]

hedge = DeltaHedgeParameters(frequency="Daily")
strategy = StrategySystematic(name = "Mock Test",
                                underliers=underlierList,
                                delta_hedge=hedge,
                                quantity=100000,
                                quantity_type= QuantityType.Notional,
                                trade_in_method= TradeInMethod.FixedRoll,
                                roll_frequency="1m")

result = strategy.backtest(start="2019-06-01", end="2019-07-01")

In the coming months, we would want to add support for signal/event driven strategies, intraday actions, different trading and transaction cost models and support for more products.

Are you willing to contribute Yes

gavriv avatar Aug 01 '19 17:08 gavriv

Is anyone working on this? I would want to take a shot at this

Rish001 avatar Oct 01 '20 10:10 Rish001