Risk Parity Analysis and Trading Program
Premia is a general purpose financial market analysis and trading program. Currently, the program supports linking a TDAmeritrade API key to gain access to features like account information, watchlists, positions, and (soon) trading actions. The program also allows InteractiveBrokers users to connect to their TWS or IB Gateway application natively to support the same features as TDAmeritrade users.
More details about the future of Premia can be found on my website halext.org/labs/Premia
CMake is required to build Premia
Clone the repository
git clone --recurse-submodules https://github.com/scawful/premia.git
Create a build directory in the root workspace folder
mkdir build
Move to the build directory and generate the build files specified in CMakeLists.txt
cmake -G "<MinGW Makefiles/Unix Makefiles>" ../
Build and run.
make Premia
cmake --build <premia_root/build> --config Debug --target Premia
For TDAmeritrade users to link their account, the program starts with a login window that takes as input your consumer key and refresh token.
Alternatively, you can create an apikey.txt and place it in the assets/ folder with your consumer key on the first line and the refresh token you generated on the second line for Premia to load those values for you.