Qf-lib

Latest version: v4.0.1

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

2.2.2

Bug fixes and optimizations:
- Optimized universe and fields id creation for the BloombergBeapHapiDataProvider
- Fixed type conversion in the BloombergBeapHapiDataProvider parser
- Added reset functionality to ErrorHandling class
- Fixed get_current_values in BloombergDataProvider in case if one of many fields requested raises an Exception

New functionality:
- Added field overrides to get_current_values and get_history requests in the BloombergBeapHapiDataProvider
- Added tickers universe functionality to the BloombergBeapHapiDataProvider (get_tickers_universe function)

2.2

New Features and Improvements:
- Changed Strategy monitoring document (added relative performance chart and excess cone chart)
- Added orders sizes rounding (`OrderRounder` class for the CRYPTO assets)
- Added support for Binance - introduced `BinanceTicker`, `BinanceDataProvider`,`BinanceContractTickerMapper`, `BinancePosition`
- Added `CSVBlotter`
- Added `exclude_weekends` function to the `RegularMarketEvent`

Bug fixes and Improvements:
- Improved performance of `PresetDataProvider.get_last_available_price` and `PresetDataProvider.historical_price`
- Fixed `get_price` for `DailyDataHandler` and `IntradayDataHandler`, so that end_date bar is always inclusive and no data from the future is returned
- Fixed `get_last_available_price` for `DailyDataHandler` and `IntradayDataHandler`, so that the latest price since the Open price of the current bar is returned
- Improved the performance of `get_last_available_price` and `historical_price` in `PresetDataProvider`
- Positions are removed from the portfolio automatically after 10 days without any price
- Fixed duplicate rows in `CSVDataProvider`

Backwards incompatible changes:
- Changed the events management (strategies have subscribe() function which they can use to subscribe to given events, new events were introduced, `DailyMarketEvent` was renamed to `RegularMarketEvent`)

2.1

New Features and Improvements:
-
- Added support for Python 3.7 (3.7.1+) and Python 3.8
- Introduced a new data provider: `CSVDataProvider`
- Introduced new classes: `BacktestCryptoPosition`
- Introduced new ticker classes: `BinanceTicker`
- Introduced new `SecurityType`: `SecurityType.CRYPTO`
- Fractional orders are allowed
- Single date queries are now supported by the `get_price` function of the `AbstractPriceDataProvider`
- Improved the performance of intraday prices aggregation in case of `PresetDataprovider.get_price`

Bug fixes:
-
- Declaration of `MarketOpenEvent` is not needed for the `PresetDataprovider.get_price` function in case of data aggregation
- Fixed `BloombergDataProvider.get_current_values`, so that now the function returns correct data types, instead of casting data to either float or string
- Fixed `BloombergDataProvider` bug causing populating the returned series / data frames with NaN values, in case if preceding elements had errors

Backwards-incompatible changes
-
- The `CcyDataProvider` class was removed
- `StrategyMonitoringDocument` cone chart shows now the excess return instead of performance
- In case of intraday frequency `get_price` and `get_history` round the starting date to the next multiply of the given frequency (e.g. in case if start date points to 12:37, it will be shifted to either 12:40 for 5-minute frequency or 12:45 for 15-minute frequency)
- removed deprecated `ExcelFilesComparator`

1.2.0beta

New Features and Improvements
- Introduced a new data provider supporting Portara data. Added the following classes into the library: `PortaraDataProvider`, `PortaraTicker`, `PortaraFutureTicker`
- Introduced new `SecurityType` Enum
- Added new parameters to `Ticker` objects: security type and point value. To provide backwards compatibility, the default values in case of `BloombergTicker`, `HaverTickers`, `QuandlTicker` and `CcyTicker` are the following: security type equals to `SecurityType.STOCK` and point value equals to 1.
- `IBContract` and `IBContractTickerMapper` classes were introduced to be used along with the `IBBroker`.
- Added `strategy` parameter to the `Order` class

Backwards-incompatible changes
- Refactored the ticker to contract mapping utilities. Currently all backtests by default use the `SimulatedContractTickerMapper`, which does not require any tickers to contracts mappings. Mappings are necessary only in case of trading, when e.g. signals are computed using `Ticker`s but the `Broker` expects a specific contract object (e.g. `IBBroker` with `IBContractTickerMapper`).
- The `Contract` class was removed.

1.1.0beta

New Features and Improvements
* Added new data provider, which uses the Bloomberg Enterprise Access Point (BEAP) HAPI
* Created `AbstractStrategy` and unified the `AlphaModelStrategy` execution
* Added `time_in_force` parameter to `size_signals` function in the `PositionSizer` class
* Added `time_in_force` parameter to `AlphaModelStrategy.__init__` function
* Created `OnBeforeMarketOpenSignalGeneration` wrapper, to facilitate the subscription process of a given Strategy to the `BeforeMarketOpenEvent`
* `AlphaModels` accept now `DataProviders` , `current_time` and `frequency` parameters were added to the `get_signal` function

Bug fixes
* Fixed the commissions computation in case if the volume of the fill (transaction) differed from corresponding orders volume

Backwards-incompatible changes
* Removed the `on_before_market_open` function from `AlphaModelStrategy` and removed the default subscription event (from now on, in order to preserve the previous behaviour, the `OnBeforeMarketOpenSignalGeneration` wrapper should be used along with the strategy)
* Removed `get_current_bar` and `get_current_prices` from `DataHandler`
* Changed the behaviour of `get_price` in `DataHandler` in case if the Open price is already available
* Moved `get_last_available_price` and `historical_price` to `DataProvider`
* `Signal.last_available_price` is not optional anymore, a required `Signal.creation_time` parameter was added

1.0.0beta

New Features and Improvements

* Added a new tearsheet document (`qf_lib.analysis.tearsheets.tearsheet_comparative.TearsheetComparative`)
* Added tools for backtest overfitting analysis (`qf_lib.analysis.backtests_overfitting.backtests_overfitting.BacktestOverfittingSheet`)
* Added tools for exposure analysis (`qf_lib.analysis.exposure_analysis.exposure_sheet .ExposureSheet`)
* Added tools for signals analysis containing various candlestick charts (`qf_lib.analysis.signals_analysis.signals_plotter.SignalsPlotter`)
* Added tools for PnL computation (`qf_lib.analysis.strategy_monitoring.pnl_calculator.PnLCalculator`)
* Added a new type of Alpha Model, which facilitates the use of futures contracts (`qf_lib.backtesting.alpha_model.futures_model.FuturesModel`)
* Some improvements to the performance of `BloombergDataProvider`
* Added the possibility of settings an expiration hour for `FutureTicker`s (`set_expiration_hour`)
* Added `ListElement` class, to support lists in PDF documents
* Added `CandlestickChart`
* Added `FillBetweenDecorator`
* Added `UnderwaterDecorator` as a substituion for `UnderwaterChart`

Bug fixes

* Many fixes to the documentation and docstrings

Backwards-incompatible changes
* Migrated to python 3.9
* Removed `UnderwaterChart`

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.