Skip to content

TradeJournal: An Attempt at Learning Day Trading via Development (Dev-A-Day 0x02)

Written by

Viking Sec

This is day 2 of my Dev-A-Day series, a series of articles on cool projects I’m working on in my free time. You can find the rest of the series here.

Let’s be totally honest here, most of us would kill to at least have the lifestyle of the star day traders.

I’m not even talking about the Lamborghini in the garage or the six summer homes in the tropics, I’m talking about getting to work 2 hours a day, if you want to, and make serious bank on the world’s favorite form of gambling.

Personal political/economic issues with the stock-market aside, the financial freedom that comes from that kind of work is super enticing. If I could make a month’s wage in the first two hours of your average day, my life would look pretty different. I’d probably still work, still develop cool tools and all, but I’d have the freedom to be a lot pickier with what I develop and how often and how long I work. That level of financial freedom sounds awesome.

I’ve played around with day trading a bit, with some incredibly minor success. The last go-round I had with it, I managed to make a pretty decent 3-5% a week for a month or two before I lost interest. One of the biggest pieces of advice I had was to journal your trading day and track statistics, advice that I took by writing down each trade: the opening and closing price, the trade volume, the time and date, etc. I wrote it all down in a notebook and calculated metastatistics by hand whenever I was curious, which got incredibly old incredibly quick. I then, eventually, moved over to Google Sheets, but didn’t love that either. Around that time, I got bored with it and didn’t come back for a while.

Now, I want to write my own swing/day trading journal application, something that will allow me to log trade statistics, track them over time, and track various meta statistics, logging all of the above in JSON format for input into other eventual analytic programs. I figured this would best be served in a web-based format, and I need to keep practicing at front-end development, so I figure this is a good way to do some full(ish) stack development on my work-in-progress homelab.

I’m doing other work in React and I am slowly getting used to it, and there are eventual aspects about the journal that I want to be responsive, so I’ll develop the front-end in React, while the back-end will be written in Flask. I’m not doing a ton of super high-frequency trading, so I’ll probably do the data storage/access in flat JSON files instead of any kind of back-end magic. Remember this moment, it’s a very rare instance where I decide not to over complicate something.

(Powered by MailChimp)

The application will include a home page dashboard that shows a small feed of recent trades and associated statistics, meta statistics like historical profit/loss numbers, best/worst trading days, best/worst ticker symbols, etc. On another page, there will be a larger, expanded feed where the user can see individual trades and associated statistics and expand individual trades to view an expanded account for that trade. I’m thinking things like trade type (long/short, swing/day) and individual industry traded. A lot of this can be automated away, such as finding the company name, history and associated industry of a given ticker symbol, but the MVP will be a manual input/output program that I’ll expand upon later. Finally, there will be a place to input new positions and close open ones.

The minimum viable product (MVP) for the first version will be a very basic form of the journal: a form to input new trades and close old ones, a very basic meta statistics page with an abbreviated feed, and a journal feed page with a basic view of each trade. I think this will be pretty cool to work on honestly, I have some cool ideas for expanding it in the future.


If you enjoyed this content, let me know by signing up for the weekly newsletter using the form above or the form on the front page, and consider throwing some coffee money my way on Patreon.

Previous article

Dev-A-Day 0x01: The Dev (Mostly) Every Day Challenge

Next article

TradeJournal: Working on the Front End for a Day Trading Journal (Dev-A-Day 0x03)