Skip to content

WIP: Backtest Module #53

@gavriv

Description

@gavriv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions