Autotrader

Latest version: v1.1.2

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

Scan your dependencies

Page 5 of 6

0.7.4

Features
- Better exception handling in CCXT broker interface.
- Ability to specify `mainnet` and `testnet` API keys in your
`keys.yaml` file.
- Ability to provide slippage models for backtests (via
`at.configure()`).

Fixes
- Inifite `while` loop bug in virtual broker `_reduce_position`
method due to machine precision.
- Backtest portfolio plotting of more than 18 instruments is
possible now due to an increased color pallete.

0.7.3

Fixes
- Unification of `get_orderbook` in supporting `broker` modules.
- Expected behaviour of `get_positions` method in CCXT broker module.

Features
- Trading object `Position` includes attribute `ccxt` to include the
output from `CCXT` methods.
- Improved configuration options for CCXT exchanges in `keys.yaml` file.

0.7.2

Fixes
- Oanda live trade functionality restored (after `keys.yaml` rename).

Features
- `AutoData` is more intelligent when creating a new instance; `kwargs` can
be used in place of `data_config` dictionary, simplifying instantiation.
- Utility methods `get_broker_config` and `get_data_config` have been
simplified, allowing calling without `global_config` argument (`keys.yaml`
will be read in from `config/` directory).

0.7.1

Changes
- Oanda configuration keys in `keys.yaml` have changed for clarification

Fixes
- Oanda `data_config` includes account id, restoring automated data retrieval

Features
- Improved portfolio plot type
- Improved printouts

0.7.0

AUGUST 2022

Breaking Changes
- Backtest `spread` is now specified in absolute price units (rather than
pips as previously)
- Environment specification: paper trading can be activated by setting
`environment` to `paper` (default) and live trading can be activated
by setting `environment` to `live`
- To further remove the distinction between backtesting and livetrading,
various methods and attributes have been renamed to reflect their
generality and indifference to mode of trading. Important changes include
`AutoTrader.backtest_results` to `AutoTrader.trade_results` (and similar for
`AutoBot`), `AutoTrader.print_backtest_results` to `AutoTrader.print_trade_results`
and `BacktestResults` class to `TradeAnalysis`.
Renaming generally followed the pattern of renaming `*backtest*` to
`*trade*`.
- For consistency in naming conventions, `GetData` class of `autodata.py` has
been renamed to `AutoData`.
- Broker interface method `get_positions` will directly
- Rename `virtual_livetrade_config` to `virtual_account_config`.
- Strategy configuration key `INCLUDE_POSITIONS` has been deprecated in favour
of using `INCLUDE_BROKER`, then directly fetching positions from broker using
`get_positions` method.
- Renamed `GLOBAL.yaml` to `keys.yaml` for clarification.
- Run mode 'continuous' has become the default run mode. To continue running strategies
in periodic update mode, you will now need to specify `mode='periodic'` in `configure`.
- The behaviour of broker method `get_trades` has changed: now returns a list of fills
(executed trades based on the `Trade` object), rather than a dictionary of
`IsolatedPositions` objects as before. This falls in line with the more common
definition of a trade, but diverges from Oanda. As such, a new method
`get_isolated_positions` has been added to the virtual broker and Oanda API interface
to maintain the previous functionality of `get_trades`.


Features
- Major backtest speed improvements: over 50% reduction in backtest time for
large, multi-asset backtests
- Live paper-trading via the virtual broker: use `AutoTrader.virtual_livetrade_config`
to configure virtual broker.
- To check-in on paper trading status, there is a new convenience method
`papertrade_snapshot`, which will print up-to-date trade results from
the virtual broker pickled instance.
- Support for decentralised crypto exchange dYdX
- Support for many more crypto exchanges via CCXT
- Introduction of 'portfolio' strategies: passing data of multiple assets to
a single strategy. Simply include `PORTFOLIO: True` in your strategy
configuration.
- Data feeds have been unified to make data retrieval simpler than ever. Now there
are methods `fetch` and `quote`, which can be used to fetch OHLC price data
from various feeds, depending on the `data_source` specified in the
data configuration dictionary. Retrieval of level 1 and level 2 data is also
available (where possible), accessible via the `L1` and `L2` methods.
- Improved backtest accuracy, with orderbook simulation and order type dependent
commissions.
- Additional commission schemes for backtesting.
- Option to specify bid/ask spread as a percentage value.
- Manual trading (paper and live) via command line. Simply configure an instance
of AutoTrader without adding a strategy, and the broker specified will be
instantiated ready for trading. Papertrading via the virtual broker supported.
- Ability to trade across multiple venues from a single strategy. Simply
provide the broker names with comma separation via the `configure` method,
- Exchange-specific precision checking for Orders. Even in backtest mode, AutoTrader
will communicate with your chosen exchange to precision-check your orders.
- Code is now formatted using [Black](https://github.com/psf/black).
- Ability to specify a time range for `PERIOD` in strategy configuration. This value
will be converted to an integer using the `INTERVAL` key.


Deprecation Notices
- Broker method `get_trade_details` has been deprecated in favour of `get_trades`
method.
- Strategy configuration key `INCLUDE_POSITIONS` has been deprecated in favour
of using `INCLUDE_BROKER`, then directly fetching positions from broker using
`get_positions` method.

Fixes
- Minor improvements to margin requirement calculations in backtest

0.6.6

Features
- Support of local data with portfolio strategies
- Backtest spread is now specified in price units for disambiguation
- Skip data warmup period to speed up backtests (specify `warmup_period` in
autotrader.backtest) in continuous update mode
- Improved backtest printout
- All instruments will be passed to a portfolio strategy as a list using the
`instrument` argument
- Instrument specific pip values can be provided when creating an order
- Improved Trade and Position `__repr__` methods

Fixes
- Bug with floating pnl calculation when running multi-instrument backtests
- Pagination of Oanda data retrieval

Page 5 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.