TradingMate is an autonomous trading system that uses customised strategies to trade in the London Stock Exchange market. This documentation provides an overview of the system, explaining how to create new trading strategies and how to integrate them with TradingMate. Explore the next sections for a detailed documentation of each module too.
TradingMate is a portfolio manager for stocks traders. It lets you record all your trades with a simple and basic interface, showing the current status of your assets and the overall profit (or loss!)
requirements.txt for the full list of python dependencies.
After cloning this repo, to install TradingMate simply run:
(This will require super-user access)
The required dependencies will be installed and all necessary files installed in /opt/TradingMate by default. It is recommended to add this path to your PATH environment variable.
TradingMate uses AlphaVantage to fetch markets data online:
Visit AlphaVantage website:
Request a free api key
Insert these info in a file called
.credentialsThis must be in json format .. code-block:: guess
.credentialsfile in the
Revoke permissions to read the file by others .. code-block:: guess
cd $HOME/.TradingMate/data sudo chmod 600 .credentials
### Configuration file
config.json file is in the
$HOME/.TradingMate/config folder and it contains several parameters to personalise how TradingMate works.
These are the descriptions of each parameter:
general/trading_log_path: The absolute path of the trading log where the history of your trades are saved
general/credentials_filepath: File path of the .credentials file
alpha_vantage/api_base_uri: Base URI of AlphaVantage API
alpha_vantage/polling_period_sec: The polling period to query AlphaVantage for stock prices
TradingMate can be controlled by the
trading_mate_ctrl shell script.
The script provides commands to perform different actions:
Closing the main window will stop the whole application. You can also use the command:
Test can’t run with the installed script. You can run the test from a “workspace” environment with:
You can run the test in Docker containers against different python versions:
The Sphinx documentation contains further details about each TradingMate module with source code documentation of each component.
Read the documentation at:
You can build it locally from the “workspace” root folder:
The generated html files will be under
I appreciate any help so if you have suggestions or issues open an Issue for discussion. If you can contribute please just open a pull request with your changes. Thanks for all the support!