├── .dockerignore ├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ ├── codeql-analysis.yml │ └── dependabot-auto-merge.yml ├── .gitignore ├── .mypy.ini ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── config └── trading_bot.toml ├── docs ├── BACKTESTING.md ├── index.md └── system.md ├── examples ├── run_backtest.py └── sample_data.csv ├── pyproject.toml ├── test ├── common │ └── MockRequests.py ├── test_backtest_integration.py ├── test_broker.py ├── test_configuration.py ├── test_data │ ├── alpha_vantage │ │ ├── av_daily_boll_bands_buy.json │ │ ├── av_daily_boll_bands_sell.json │ │ ├── mock_av_daily.json │ │ ├── mock_av_weekly.json │ │ ├── mock_macd_ext_buy.json │ │ ├── mock_macd_ext_hold.json │ │ └── mock_macd_ext_sell.json │ ├── credentials.json │ ├── epics_list.txt │ ├── ig │ │ ├── mock_account_details.json │ │ ├── mock_error.json │ │ ├── mock_historic_price.json │ │ ├── mock_login.json │ │ ├── mock_market_info.json │ │ ├── mock_market_search.json │ │ ├── mock_navigate_markets_markets.json │ │ ├── mock_navigate_markets_nodes.json │ │ ├── mock_positions.json │ │ ├── mock_set_account.json │ │ ├── mock_watchlist.json │ │ └── mock_watchlist_list.json │ ├── trading_bot.toml │ └── yfinance │ │ └── mock_history_day_max.json ├── test_ig_interface.py ├── test_market_provider.py ├── test_simple_boll_bands.py ├── test_simple_macd.py ├── test_strategy_factory.py ├── test_time_provider.py ├── test_trading_bot.py └── test_utils.py ├── tradingbot ├── __init__.py ├── __main__.py ├── components │ ├── __init__.py │ ├── backtester.py │ ├── broker │ │ ├── __init__.py │ │ ├── abstract_interfaces.py │ │ ├── av_interface.py │ │ ├── broker.py │ │ ├── factories.py │ │ ├── ig_interface.py │ │ └── yf_interface.py │ ├── config_model.py │ ├── configuration.py │ ├── market_provider.py │ ├── time_provider.py │ └── utils.py ├── interfaces │ ├── __init__.py │ ├── market.py │ ├── market_history.py │ ├── market_macd.py │ └── position.py ├── strategies │ ├── __init__.py │ ├── base.py │ ├── factories.py │ ├── simple_bollinger_bands.py │ ├── simple_macd.py │ └── volume_profile.py └── trading_bot.py └── uv.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !Makefile 3 | !uv.lock 4 | !pyproject.toml 5 | !README.md 6 | !tradingbot 7 | !config 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/.github/workflows/codeql-analysis.yml -------------------------------------------------------------------------------- /.github/workflows/dependabot-auto-merge.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/.github/workflows/dependabot-auto-merge.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/.gitignore -------------------------------------------------------------------------------- /.mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | ignore_missing_imports = True 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/README.md -------------------------------------------------------------------------------- /config/trading_bot.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/config/trading_bot.toml -------------------------------------------------------------------------------- /docs/BACKTESTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/docs/BACKTESTING.md -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/docs/index.md -------------------------------------------------------------------------------- /docs/system.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/docs/system.md -------------------------------------------------------------------------------- /examples/run_backtest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/examples/run_backtest.py -------------------------------------------------------------------------------- /examples/sample_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/examples/sample_data.csv -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/pyproject.toml -------------------------------------------------------------------------------- /test/common/MockRequests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/common/MockRequests.py -------------------------------------------------------------------------------- /test/test_backtest_integration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_backtest_integration.py -------------------------------------------------------------------------------- /test/test_broker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_broker.py -------------------------------------------------------------------------------- /test/test_configuration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_configuration.py -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/av_daily_boll_bands_buy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/av_daily_boll_bands_buy.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/av_daily_boll_bands_sell.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/av_daily_boll_bands_sell.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/mock_av_daily.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/mock_av_daily.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/mock_av_weekly.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/mock_av_weekly.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/mock_macd_ext_buy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/mock_macd_ext_buy.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/mock_macd_ext_hold.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/mock_macd_ext_hold.json -------------------------------------------------------------------------------- /test/test_data/alpha_vantage/mock_macd_ext_sell.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/alpha_vantage/mock_macd_ext_sell.json -------------------------------------------------------------------------------- /test/test_data/credentials.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/credentials.json -------------------------------------------------------------------------------- /test/test_data/epics_list.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/epics_list.txt -------------------------------------------------------------------------------- /test/test_data/ig/mock_account_details.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_account_details.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "errorCode": "123" 3 | } 4 | -------------------------------------------------------------------------------- /test/test_data/ig/mock_historic_price.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_historic_price.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_login.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_login.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_market_info.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_market_info.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_market_search.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_market_search.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_navigate_markets_markets.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_navigate_markets_markets.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_navigate_markets_nodes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_navigate_markets_nodes.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_positions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_positions.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_set_account.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_set_account.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_watchlist.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_watchlist.json -------------------------------------------------------------------------------- /test/test_data/ig/mock_watchlist_list.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/ig/mock_watchlist_list.json -------------------------------------------------------------------------------- /test/test_data/trading_bot.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/trading_bot.toml -------------------------------------------------------------------------------- /test/test_data/yfinance/mock_history_day_max.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_data/yfinance/mock_history_day_max.json -------------------------------------------------------------------------------- /test/test_ig_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_ig_interface.py -------------------------------------------------------------------------------- /test/test_market_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_market_provider.py -------------------------------------------------------------------------------- /test/test_simple_boll_bands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_simple_boll_bands.py -------------------------------------------------------------------------------- /test/test_simple_macd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_simple_macd.py -------------------------------------------------------------------------------- /test/test_strategy_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_strategy_factory.py -------------------------------------------------------------------------------- /test/test_time_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_time_provider.py -------------------------------------------------------------------------------- /test/test_trading_bot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_trading_bot.py -------------------------------------------------------------------------------- /test/test_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/test/test_utils.py -------------------------------------------------------------------------------- /tradingbot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/__init__.py -------------------------------------------------------------------------------- /tradingbot/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/__main__.py -------------------------------------------------------------------------------- /tradingbot/components/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/__init__.py -------------------------------------------------------------------------------- /tradingbot/components/backtester.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/backtester.py -------------------------------------------------------------------------------- /tradingbot/components/broker/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/__init__.py -------------------------------------------------------------------------------- /tradingbot/components/broker/abstract_interfaces.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/abstract_interfaces.py -------------------------------------------------------------------------------- /tradingbot/components/broker/av_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/av_interface.py -------------------------------------------------------------------------------- /tradingbot/components/broker/broker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/broker.py -------------------------------------------------------------------------------- /tradingbot/components/broker/factories.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/factories.py -------------------------------------------------------------------------------- /tradingbot/components/broker/ig_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/ig_interface.py -------------------------------------------------------------------------------- /tradingbot/components/broker/yf_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/broker/yf_interface.py -------------------------------------------------------------------------------- /tradingbot/components/config_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/config_model.py -------------------------------------------------------------------------------- /tradingbot/components/configuration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/configuration.py -------------------------------------------------------------------------------- /tradingbot/components/market_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/market_provider.py -------------------------------------------------------------------------------- /tradingbot/components/time_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/time_provider.py -------------------------------------------------------------------------------- /tradingbot/components/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/components/utils.py -------------------------------------------------------------------------------- /tradingbot/interfaces/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/interfaces/__init__.py -------------------------------------------------------------------------------- /tradingbot/interfaces/market.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/interfaces/market.py -------------------------------------------------------------------------------- /tradingbot/interfaces/market_history.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/interfaces/market_history.py -------------------------------------------------------------------------------- /tradingbot/interfaces/market_macd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/interfaces/market_macd.py -------------------------------------------------------------------------------- /tradingbot/interfaces/position.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/interfaces/position.py -------------------------------------------------------------------------------- /tradingbot/strategies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/__init__.py -------------------------------------------------------------------------------- /tradingbot/strategies/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/base.py -------------------------------------------------------------------------------- /tradingbot/strategies/factories.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/factories.py -------------------------------------------------------------------------------- /tradingbot/strategies/simple_bollinger_bands.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/simple_bollinger_bands.py -------------------------------------------------------------------------------- /tradingbot/strategies/simple_macd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/simple_macd.py -------------------------------------------------------------------------------- /tradingbot/strategies/volume_profile.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/strategies/volume_profile.py -------------------------------------------------------------------------------- /tradingbot/trading_bot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/tradingbot/trading_bot.py -------------------------------------------------------------------------------- /uv.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilcardella/TradingBot/HEAD/uv.lock --------------------------------------------------------------------------------