mhallsmoore / qstrader

QuantStart.com - QSTrader backtesting simulation engine.
https://www.quantstart.com/qstrader/
MIT License
2.93k stars 855 forks source link

Why start_date and end_date are not optional? #219

Closed Kroid closed 8 months ago

Kroid commented 7 years ago

In TradingSession, start_date & end_date - requires fields. But why? In price_handler they are optional values with None as default.

JamesKBowler commented 7 years ago

Are you looking at this part?

        start = None
        end = None
        if self.start_date is not None:
            start = df.index.searchsorted(self.start_date)
        if self.end_date is not None:
            end = df.index.searchsorted(self.end_date)
juliettejames commented 8 months ago

This has been fixed and is present in the latest version. Start and End dates can be changed in backtest.py

Thanks