A tool to automate the daily review of trades
https://github.com/MikePia/structjour
Structjour will import statements from DAS Trader Pro trading platform and Interactive Broker Statements.
I am very interested in all issues. Please inform me here. (issues on github). Uploaded to PyPi its initial pre-release Sept 28 '19. First concerns are install and run errors. As the sole developer I am anxious to get users' and perspectives on all issues.
Structjour currently reads DAS Trader Pro export files and Interactive Broker Statements Its pre Alpha.
The statistics hub below is a proof of concept. Its accessed through the main menu file->statistics hub. As alwasy, please send suggestions and bug reports.
I am finding designing the statistics hub very challenging as there are so many possibilities. At this point, I am asking for specific design help. Send suggestions for what charts/layouts would be most useful to you, real day traders... I will probably implement any examples of charts that are suggested. The current plan is to place them in themed stacked pages, 3 charts per page. Each page will have the user controls for dates, symbols, accounts etc. The emphasis of Structjour is day trading, but the statistics hub should give the longer term view of successful and failing trading activities.
The Daily Summary:
Install it in the usual python way from any python enabled shell using python 3.6 or greater.
pip install structjour
After installing, the program will be in your python Scripts directory underneath the directory containing python.exe
C:\\gs\\python\\python.exe
C:\\gs\\python\\Scripts\\structjour.exe
You can click on it, set a shortcut or run it from the commandline.
Go to file->file settings
The free APIs produce excellent charts but are limited to market hours and 7 to 30 days history. If you have an Interactive Brokers account and can receive data from them, this is the best data. It includes afterhours data, does not have a practical limit on the dates for which you can receive data, and has no limits to usage. Briefly, to use ibapi you must:
Add your reviews and charts for each trade. Navigate trades using the combo box.
Click Save User Data to store your reviews etc in the database (You may have to click it twice.)
Import from DAS Trader Pro or Interactive Broker Statements. If requested I plan to include other brokers' statements.
Individual trading transactionas are combined into tickets and tickets are combined into trades. Trades are displayed showing ticket entries, exits, PnL, and the diff between initial entry and exit and some other stuff.
A place to enter your initial target and stoploss can detect when the stop is violated and figures the lost PnL. The loss amount can be edited to reflect loss of real or potential PnL due to breaking your rules.
For your trade review, there is a strategey dropdown to choose from, a location to describe your trade, a location to analyze your trade, and a location to summarize your trade (which will be included in your daily summary).
The strategy dropdown box on the main page can add new strategies to your list. Strategies are supported by the strategy browser where you can define your strategies and check whether to include them in the dropdown box on the front page. In the Strategy browser, you can define your strategy and provide a couple images. Additionally you can add web pages that describe each strategy
Charts can be 1) automatically generated 2) copied from the clipboard or 3) loaded from a file. Data for automatic chart generation has four possible sources. WorldTradeData, Alphavantage and Barchart (free APIs) and Interactive Brokers python API using IB Gateway or Trader Work Station. If you have all four APIS setup, structjour will choose one based on availability and your set preference. The setup for WorldTradeData Alphavantage and Barchart requires you get an API key (very simple and available to everyone). The ibapi data (setup more complicated) has the advantage of providing after hours data and long historical availability. Automatic chart generation can include Moving averages and VWAP. All charts are stored in a directory for that day providing easy access.
Input files are limited to DAS Trader PRO exports and IB statements (Activity, Trade and Flex statements). At some point in the future, other formats will be added.
Navigation between days is done with a date widget. Just Change the date and click read or load to read a new file or load saved data.
The daily summary has a place to store notes that refer to the whole day. A summary of Wins and losses is displayed that includes the summary made for each trade.
Everything is stored in a light-weight sqlite database
The entire day can be exported to an excel file which includes a trades table, the daily summaries, easy to read forms for each trade and the charts.
All of your trades can be exported to an excel file (a tweak of 'DisciplinedTrader.xlsx) which shows monthly and yearly statistics.
Excel export. All trades from a day are imported into a single sheet and saved in the out directory for that date
Strategy Browser
Strategy web browser
Export to an excel analysis tool
The state of the software is pre-alpha. I created it for my own use based on what I needed. I believe the scope has grown to be more generally useful for Day-Traders of Stock Equities.
If you are interested in contributing, I would welcome your help and input in any and all areas of design, implementation and bug reports.