├── .github └── workflows │ └── runtests.yml ├── .gitignore ├── .readthedocs.yaml ├── CHANGELOG.md ├── DEVELOPERS.md ├── LICENSE ├── README.md ├── basana ├── __init__.py ├── backtesting │ ├── __init__.py │ ├── account_balances.py │ ├── charts.py │ ├── config.py │ ├── errors.py │ ├── exchange.py │ ├── fees.py │ ├── helpers.py │ ├── lending │ │ ├── __init__.py │ │ ├── base.py │ │ └── margin.py │ ├── liquidity.py │ ├── loan_mgr.py │ ├── order_mgr.py │ ├── orders.py │ ├── prices.py │ ├── requests.py │ └── value_map.py ├── core │ ├── __init__.py │ ├── bar.py │ ├── config.py │ ├── dispatcher.py │ ├── dt.py │ ├── enums.py │ ├── errors.py │ ├── event.py │ ├── event_sources │ │ ├── __init__.py │ │ ├── csv.py │ │ └── trading_signal.py │ ├── helpers.py │ ├── logs.py │ ├── pair.py │ ├── token_bucket.py │ └── websockets.py └── external │ ├── __init__.py │ ├── binance │ ├── __init__.py │ ├── client │ │ ├── __init__.py │ │ ├── base.py │ │ ├── margin.py │ │ └── spot.py │ ├── common.py │ ├── config.py │ ├── cross_margin.py │ ├── csv │ │ ├── __init__.py │ │ └── bars.py │ ├── exchange.py │ ├── helpers.py │ ├── isolated_margin.py │ ├── klines.py │ ├── margin.py │ ├── margin_requests.py │ ├── order_book.py │ ├── order_book_diff.py │ ├── spot.py │ ├── spot_requests.py │ ├── tools │ │ ├── __init__.py │ │ └── download_bars.py │ ├── trades.py │ ├── user_data.py │ ├── websocket_mgr.py │ └── websockets.py │ ├── bitstamp │ ├── __init__.py │ ├── client.py │ ├── config.py │ ├── csv │ │ ├── __init__.py │ │ └── bars.py │ ├── exchange.py │ ├── helpers.py │ ├── order_book.py │ ├── orders.py │ ├── requests.py │ ├── tools │ │ ├── __init__.py │ │ └── download_bars.py │ ├── trades.py │ └── websockets.py │ ├── common │ ├── __init__.py │ └── csv │ │ ├── __init__.py │ │ └── bars.py │ └── yahoo │ ├── __init__.py │ └── bars.py ├── docs ├── Makefile ├── _static │ ├── backtesting_bbands.png │ ├── order_book_mirror.png │ └── readme_pairs_trading.png ├── api.rst ├── backtesting_charts.rst ├── backtesting_exchange.rst ├── backtesting_fees.rst ├── backtesting_lending.rst ├── backtesting_liquidity.rst ├── basana.rst ├── binance_cross.rst ├── binance_exchange.rst ├── binance_isolated.rst ├── binance_margin.rst ├── binance_order_book.rst ├── binance_order_book_diff.rst ├── binance_spot.rst ├── binance_trades.rst ├── binance_user_data.rst ├── bitstamp_exchange.rst ├── bitstamp_order_book.rst ├── bitstamp_orders.rst ├── bitstamp_trades.rst ├── conf.py ├── help.rst ├── index.rst ├── make.bat └── quickstart.rst ├── poetry.lock ├── pyproject.toml ├── samples ├── __init__.py ├── backtest_bbands.py ├── backtest_pairs_trading.py ├── backtest_rsi.py ├── backtest_sma.py ├── backtesting │ ├── __init__.py │ └── position_manager.py ├── binance │ ├── __init__.py │ ├── order_book_mirror.py │ └── position_manager.py ├── binance_bbands.py ├── binance_order_book_mirror.py ├── binance_websockets.py ├── bitstamp_websockets.py └── strategies │ ├── __init__.py │ ├── bbands.py │ ├── dmac.py │ ├── pairs_trading.py │ ├── rsi.py │ └── sma.py ├── setup.cfg ├── tasks.py └── tests ├── __init__.py ├── backtesting_exchange_orders_test_data.py ├── conftest.py ├── data ├── binance_btc_usdt_exchange_info.json ├── binance_btcusdt_day_2020.csv ├── binance_cross_margin_account_details.json ├── binance_depth_update.json ├── binance_isolated_margin_account_details.json ├── bitstamp_btcusd_day_2015.csv ├── bitstamp_btcusd_day_2015.csv.utf16 ├── bitstamp_btcusd_min_2020_01_01.csv ├── orcl-2000-yahoo-sorted.csv ├── orcl-2000-yahoo.csv └── orcl-2001-yahoo.csv ├── fixtures ├── __init__.py ├── binance.py ├── bitstamp.py └── dispatcher.py ├── helpers.py ├── test_backtesting_account_balances.py ├── test_backtesting_charts.py ├── test_backtesting_config.py ├── test_backtesting_dispatcher.py ├── test_backtesting_exchange.py ├── test_backtesting_exchange_auto_lending.py ├── test_backtesting_exchange_loans.py ├── test_backtesting_exchange_orders.py ├── test_backtesting_fees.py ├── test_backtesting_liquidity.py ├── test_backtesting_margin.py ├── test_backtesting_orders.py ├── test_backtesting_prices.py ├── test_backtesting_value_map.py ├── test_bar.py ├── test_binance_bars.py ├── test_binance_client.py ├── test_binance_csv_bars.py ├── test_binance_exchange.py ├── test_binance_exchange_cross_margin.py ├── test_binance_exchange_isolated_margin.py ├── test_binance_exchange_spot.py ├── test_binance_order_book updates.py ├── test_binance_order_book.py ├── test_binance_tools.py ├── test_binance_trades.py ├── test_binance_user_data.py ├── test_bitstamp_bars.py ├── test_bitstamp_client.py ├── test_bitstamp_csv_bars.py ├── test_bitstamp_exchange.py ├── test_bitstamp_order_book.py ├── test_bitstamp_orders.py ├── test_bitstamp_tools.py ├── test_bitstamp_trades.py ├── test_config.py ├── test_core_dt.py ├── test_core_helpers.py ├── test_core_websockets.py ├── test_dispatcher_core.py ├── test_enums.py ├── test_event.py ├── test_pair.py ├── test_realtime_dispatcher.py ├── test_samples_backtesting_pos_info.py ├── test_samples_binance_order_book_mirror.py ├── test_token_bucket.py ├── test_trading_signal.py └── test_yahoo.py /.github/workflows/runtests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/.github/workflows/runtests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/.gitignore -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/.readthedocs.yaml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /DEVELOPERS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/DEVELOPERS.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/README.md -------------------------------------------------------------------------------- /basana/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/__init__.py -------------------------------------------------------------------------------- /basana/backtesting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/__init__.py -------------------------------------------------------------------------------- /basana/backtesting/account_balances.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/account_balances.py -------------------------------------------------------------------------------- /basana/backtesting/charts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/charts.py -------------------------------------------------------------------------------- /basana/backtesting/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/config.py -------------------------------------------------------------------------------- /basana/backtesting/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/errors.py -------------------------------------------------------------------------------- /basana/backtesting/exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/exchange.py -------------------------------------------------------------------------------- /basana/backtesting/fees.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/fees.py -------------------------------------------------------------------------------- /basana/backtesting/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/helpers.py -------------------------------------------------------------------------------- /basana/backtesting/lending/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/lending/__init__.py -------------------------------------------------------------------------------- /basana/backtesting/lending/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/lending/base.py -------------------------------------------------------------------------------- /basana/backtesting/lending/margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/lending/margin.py -------------------------------------------------------------------------------- /basana/backtesting/liquidity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/liquidity.py -------------------------------------------------------------------------------- /basana/backtesting/loan_mgr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/loan_mgr.py -------------------------------------------------------------------------------- /basana/backtesting/order_mgr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/order_mgr.py -------------------------------------------------------------------------------- /basana/backtesting/orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/orders.py -------------------------------------------------------------------------------- /basana/backtesting/prices.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/prices.py -------------------------------------------------------------------------------- /basana/backtesting/requests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/requests.py -------------------------------------------------------------------------------- /basana/backtesting/value_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/backtesting/value_map.py -------------------------------------------------------------------------------- /basana/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/__init__.py -------------------------------------------------------------------------------- /basana/core/bar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/bar.py -------------------------------------------------------------------------------- /basana/core/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/config.py -------------------------------------------------------------------------------- /basana/core/dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/dispatcher.py -------------------------------------------------------------------------------- /basana/core/dt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/dt.py -------------------------------------------------------------------------------- /basana/core/enums.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/enums.py -------------------------------------------------------------------------------- /basana/core/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/errors.py -------------------------------------------------------------------------------- /basana/core/event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/event.py -------------------------------------------------------------------------------- /basana/core/event_sources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/event_sources/__init__.py -------------------------------------------------------------------------------- /basana/core/event_sources/csv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/event_sources/csv.py -------------------------------------------------------------------------------- /basana/core/event_sources/trading_signal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/event_sources/trading_signal.py -------------------------------------------------------------------------------- /basana/core/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/helpers.py -------------------------------------------------------------------------------- /basana/core/logs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/logs.py -------------------------------------------------------------------------------- /basana/core/pair.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/pair.py -------------------------------------------------------------------------------- /basana/core/token_bucket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/token_bucket.py -------------------------------------------------------------------------------- /basana/core/websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/core/websockets.py -------------------------------------------------------------------------------- /basana/external/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/__init__.py -------------------------------------------------------------------------------- /basana/external/binance/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/__init__.py -------------------------------------------------------------------------------- /basana/external/binance/client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/client/__init__.py -------------------------------------------------------------------------------- /basana/external/binance/client/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/client/base.py -------------------------------------------------------------------------------- /basana/external/binance/client/margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/client/margin.py -------------------------------------------------------------------------------- /basana/external/binance/client/spot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/client/spot.py -------------------------------------------------------------------------------- /basana/external/binance/common.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/common.py -------------------------------------------------------------------------------- /basana/external/binance/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/config.py -------------------------------------------------------------------------------- /basana/external/binance/cross_margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/cross_margin.py -------------------------------------------------------------------------------- /basana/external/binance/csv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/csv/__init__.py -------------------------------------------------------------------------------- /basana/external/binance/csv/bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/csv/bars.py -------------------------------------------------------------------------------- /basana/external/binance/exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/exchange.py -------------------------------------------------------------------------------- /basana/external/binance/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/helpers.py -------------------------------------------------------------------------------- /basana/external/binance/isolated_margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/isolated_margin.py -------------------------------------------------------------------------------- /basana/external/binance/klines.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/klines.py -------------------------------------------------------------------------------- /basana/external/binance/margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/margin.py -------------------------------------------------------------------------------- /basana/external/binance/margin_requests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/margin_requests.py -------------------------------------------------------------------------------- /basana/external/binance/order_book.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/order_book.py -------------------------------------------------------------------------------- /basana/external/binance/order_book_diff.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/order_book_diff.py -------------------------------------------------------------------------------- /basana/external/binance/spot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/spot.py -------------------------------------------------------------------------------- /basana/external/binance/spot_requests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/spot_requests.py -------------------------------------------------------------------------------- /basana/external/binance/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/tools/__init__.py -------------------------------------------------------------------------------- /basana/external/binance/tools/download_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/tools/download_bars.py -------------------------------------------------------------------------------- /basana/external/binance/trades.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/trades.py -------------------------------------------------------------------------------- /basana/external/binance/user_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/user_data.py -------------------------------------------------------------------------------- /basana/external/binance/websocket_mgr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/websocket_mgr.py -------------------------------------------------------------------------------- /basana/external/binance/websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/binance/websockets.py -------------------------------------------------------------------------------- /basana/external/bitstamp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/__init__.py -------------------------------------------------------------------------------- /basana/external/bitstamp/client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/client.py -------------------------------------------------------------------------------- /basana/external/bitstamp/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/config.py -------------------------------------------------------------------------------- /basana/external/bitstamp/csv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/csv/__init__.py -------------------------------------------------------------------------------- /basana/external/bitstamp/csv/bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/csv/bars.py -------------------------------------------------------------------------------- /basana/external/bitstamp/exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/exchange.py -------------------------------------------------------------------------------- /basana/external/bitstamp/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/helpers.py -------------------------------------------------------------------------------- /basana/external/bitstamp/order_book.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/order_book.py -------------------------------------------------------------------------------- /basana/external/bitstamp/orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/orders.py -------------------------------------------------------------------------------- /basana/external/bitstamp/requests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/requests.py -------------------------------------------------------------------------------- /basana/external/bitstamp/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/tools/__init__.py -------------------------------------------------------------------------------- /basana/external/bitstamp/tools/download_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/tools/download_bars.py -------------------------------------------------------------------------------- /basana/external/bitstamp/trades.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/trades.py -------------------------------------------------------------------------------- /basana/external/bitstamp/websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/bitstamp/websockets.py -------------------------------------------------------------------------------- /basana/external/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/common/__init__.py -------------------------------------------------------------------------------- /basana/external/common/csv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/common/csv/__init__.py -------------------------------------------------------------------------------- /basana/external/common/csv/bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/common/csv/bars.py -------------------------------------------------------------------------------- /basana/external/yahoo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/yahoo/__init__.py -------------------------------------------------------------------------------- /basana/external/yahoo/bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/basana/external/yahoo/bars.py -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/Makefile -------------------------------------------------------------------------------- /docs/_static/backtesting_bbands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/_static/backtesting_bbands.png -------------------------------------------------------------------------------- /docs/_static/order_book_mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/_static/order_book_mirror.png -------------------------------------------------------------------------------- /docs/_static/readme_pairs_trading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/_static/readme_pairs_trading.png -------------------------------------------------------------------------------- /docs/api.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/api.rst -------------------------------------------------------------------------------- /docs/backtesting_charts.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/backtesting_charts.rst -------------------------------------------------------------------------------- /docs/backtesting_exchange.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/backtesting_exchange.rst -------------------------------------------------------------------------------- /docs/backtesting_fees.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/backtesting_fees.rst -------------------------------------------------------------------------------- /docs/backtesting_lending.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/backtesting_lending.rst -------------------------------------------------------------------------------- /docs/backtesting_liquidity.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/backtesting_liquidity.rst -------------------------------------------------------------------------------- /docs/basana.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/basana.rst -------------------------------------------------------------------------------- /docs/binance_cross.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_cross.rst -------------------------------------------------------------------------------- /docs/binance_exchange.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_exchange.rst -------------------------------------------------------------------------------- /docs/binance_isolated.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_isolated.rst -------------------------------------------------------------------------------- /docs/binance_margin.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_margin.rst -------------------------------------------------------------------------------- /docs/binance_order_book.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_order_book.rst -------------------------------------------------------------------------------- /docs/binance_order_book_diff.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_order_book_diff.rst -------------------------------------------------------------------------------- /docs/binance_spot.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_spot.rst -------------------------------------------------------------------------------- /docs/binance_trades.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_trades.rst -------------------------------------------------------------------------------- /docs/binance_user_data.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/binance_user_data.rst -------------------------------------------------------------------------------- /docs/bitstamp_exchange.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/bitstamp_exchange.rst -------------------------------------------------------------------------------- /docs/bitstamp_order_book.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/bitstamp_order_book.rst -------------------------------------------------------------------------------- /docs/bitstamp_orders.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/bitstamp_orders.rst -------------------------------------------------------------------------------- /docs/bitstamp_trades.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/bitstamp_trades.rst -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/conf.py -------------------------------------------------------------------------------- /docs/help.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/help.rst -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/index.rst -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/make.bat -------------------------------------------------------------------------------- /docs/quickstart.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/docs/quickstart.rst -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/poetry.lock -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/pyproject.toml -------------------------------------------------------------------------------- /samples/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/__init__.py -------------------------------------------------------------------------------- /samples/backtest_bbands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtest_bbands.py -------------------------------------------------------------------------------- /samples/backtest_pairs_trading.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtest_pairs_trading.py -------------------------------------------------------------------------------- /samples/backtest_rsi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtest_rsi.py -------------------------------------------------------------------------------- /samples/backtest_sma.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtest_sma.py -------------------------------------------------------------------------------- /samples/backtesting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtesting/__init__.py -------------------------------------------------------------------------------- /samples/backtesting/position_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/backtesting/position_manager.py -------------------------------------------------------------------------------- /samples/binance/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance/__init__.py -------------------------------------------------------------------------------- /samples/binance/order_book_mirror.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance/order_book_mirror.py -------------------------------------------------------------------------------- /samples/binance/position_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance/position_manager.py -------------------------------------------------------------------------------- /samples/binance_bbands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance_bbands.py -------------------------------------------------------------------------------- /samples/binance_order_book_mirror.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance_order_book_mirror.py -------------------------------------------------------------------------------- /samples/binance_websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/binance_websockets.py -------------------------------------------------------------------------------- /samples/bitstamp_websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/bitstamp_websockets.py -------------------------------------------------------------------------------- /samples/strategies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/__init__.py -------------------------------------------------------------------------------- /samples/strategies/bbands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/bbands.py -------------------------------------------------------------------------------- /samples/strategies/dmac.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/dmac.py -------------------------------------------------------------------------------- /samples/strategies/pairs_trading.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/pairs_trading.py -------------------------------------------------------------------------------- /samples/strategies/rsi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/rsi.py -------------------------------------------------------------------------------- /samples/strategies/sma.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/samples/strategies/sma.py -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/setup.cfg -------------------------------------------------------------------------------- /tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tasks.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/__init__.py -------------------------------------------------------------------------------- /tests/backtesting_exchange_orders_test_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/backtesting_exchange_orders_test_data.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/data/binance_btc_usdt_exchange_info.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/binance_btc_usdt_exchange_info.json -------------------------------------------------------------------------------- /tests/data/binance_btcusdt_day_2020.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/binance_btcusdt_day_2020.csv -------------------------------------------------------------------------------- /tests/data/binance_cross_margin_account_details.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/binance_cross_margin_account_details.json -------------------------------------------------------------------------------- /tests/data/binance_depth_update.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/binance_depth_update.json -------------------------------------------------------------------------------- /tests/data/binance_isolated_margin_account_details.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/binance_isolated_margin_account_details.json -------------------------------------------------------------------------------- /tests/data/bitstamp_btcusd_day_2015.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/bitstamp_btcusd_day_2015.csv -------------------------------------------------------------------------------- /tests/data/bitstamp_btcusd_day_2015.csv.utf16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/bitstamp_btcusd_day_2015.csv.utf16 -------------------------------------------------------------------------------- /tests/data/bitstamp_btcusd_min_2020_01_01.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/bitstamp_btcusd_min_2020_01_01.csv -------------------------------------------------------------------------------- /tests/data/orcl-2000-yahoo-sorted.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/orcl-2000-yahoo-sorted.csv -------------------------------------------------------------------------------- /tests/data/orcl-2000-yahoo.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/orcl-2000-yahoo.csv -------------------------------------------------------------------------------- /tests/data/orcl-2001-yahoo.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/data/orcl-2001-yahoo.csv -------------------------------------------------------------------------------- /tests/fixtures/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/fixtures/binance.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/fixtures/binance.py -------------------------------------------------------------------------------- /tests/fixtures/bitstamp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/fixtures/bitstamp.py -------------------------------------------------------------------------------- /tests/fixtures/dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/fixtures/dispatcher.py -------------------------------------------------------------------------------- /tests/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/helpers.py -------------------------------------------------------------------------------- /tests/test_backtesting_account_balances.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_account_balances.py -------------------------------------------------------------------------------- /tests/test_backtesting_charts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_charts.py -------------------------------------------------------------------------------- /tests/test_backtesting_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_config.py -------------------------------------------------------------------------------- /tests/test_backtesting_dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_dispatcher.py -------------------------------------------------------------------------------- /tests/test_backtesting_exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_exchange.py -------------------------------------------------------------------------------- /tests/test_backtesting_exchange_auto_lending.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_exchange_auto_lending.py -------------------------------------------------------------------------------- /tests/test_backtesting_exchange_loans.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_exchange_loans.py -------------------------------------------------------------------------------- /tests/test_backtesting_exchange_orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_exchange_orders.py -------------------------------------------------------------------------------- /tests/test_backtesting_fees.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_fees.py -------------------------------------------------------------------------------- /tests/test_backtesting_liquidity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_liquidity.py -------------------------------------------------------------------------------- /tests/test_backtesting_margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_margin.py -------------------------------------------------------------------------------- /tests/test_backtesting_orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_orders.py -------------------------------------------------------------------------------- /tests/test_backtesting_prices.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_prices.py -------------------------------------------------------------------------------- /tests/test_backtesting_value_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_backtesting_value_map.py -------------------------------------------------------------------------------- /tests/test_bar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bar.py -------------------------------------------------------------------------------- /tests/test_binance_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_bars.py -------------------------------------------------------------------------------- /tests/test_binance_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_client.py -------------------------------------------------------------------------------- /tests/test_binance_csv_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_csv_bars.py -------------------------------------------------------------------------------- /tests/test_binance_exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_exchange.py -------------------------------------------------------------------------------- /tests/test_binance_exchange_cross_margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_exchange_cross_margin.py -------------------------------------------------------------------------------- /tests/test_binance_exchange_isolated_margin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_exchange_isolated_margin.py -------------------------------------------------------------------------------- /tests/test_binance_exchange_spot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_exchange_spot.py -------------------------------------------------------------------------------- /tests/test_binance_order_book updates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_order_book updates.py -------------------------------------------------------------------------------- /tests/test_binance_order_book.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_order_book.py -------------------------------------------------------------------------------- /tests/test_binance_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_tools.py -------------------------------------------------------------------------------- /tests/test_binance_trades.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_trades.py -------------------------------------------------------------------------------- /tests/test_binance_user_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_binance_user_data.py -------------------------------------------------------------------------------- /tests/test_bitstamp_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_bars.py -------------------------------------------------------------------------------- /tests/test_bitstamp_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_client.py -------------------------------------------------------------------------------- /tests/test_bitstamp_csv_bars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_csv_bars.py -------------------------------------------------------------------------------- /tests/test_bitstamp_exchange.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_exchange.py -------------------------------------------------------------------------------- /tests/test_bitstamp_order_book.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_order_book.py -------------------------------------------------------------------------------- /tests/test_bitstamp_orders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_orders.py -------------------------------------------------------------------------------- /tests/test_bitstamp_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_tools.py -------------------------------------------------------------------------------- /tests/test_bitstamp_trades.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_bitstamp_trades.py -------------------------------------------------------------------------------- /tests/test_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_config.py -------------------------------------------------------------------------------- /tests/test_core_dt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_core_dt.py -------------------------------------------------------------------------------- /tests/test_core_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_core_helpers.py -------------------------------------------------------------------------------- /tests/test_core_websockets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_core_websockets.py -------------------------------------------------------------------------------- /tests/test_dispatcher_core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_dispatcher_core.py -------------------------------------------------------------------------------- /tests/test_enums.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_enums.py -------------------------------------------------------------------------------- /tests/test_event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_event.py -------------------------------------------------------------------------------- /tests/test_pair.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_pair.py -------------------------------------------------------------------------------- /tests/test_realtime_dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_realtime_dispatcher.py -------------------------------------------------------------------------------- /tests/test_samples_backtesting_pos_info.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_samples_backtesting_pos_info.py -------------------------------------------------------------------------------- /tests/test_samples_binance_order_book_mirror.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_samples_binance_order_book_mirror.py -------------------------------------------------------------------------------- /tests/test_token_bucket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_token_bucket.py -------------------------------------------------------------------------------- /tests/test_trading_signal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_trading_signal.py -------------------------------------------------------------------------------- /tests/test_yahoo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbeced/basana/HEAD/tests/test_yahoo.py --------------------------------------------------------------------------------