This page provides some colour around Tradesy’s roots, design, and future potential.

Background

I began work on Tradesy in mid-March 2021 inspired by some ideas that came out of conversations with a colleague related to our recent small-scale dabbings in stock trading on the North American markets. In particular, I mused that one ought to be able to see recurring profit over time by making frequent trades in accordance with small market movements on a consistent basis (buying after tiny drops and selling after tiny gains). To explore this, I proposed that an analysis of historical market performance would be useful, and a bespoke tool to aid in this would be ideal. It would also give me a fun new project to work on. (I came up with the name “Tradesy” on a whim as a working title; I don’t recall any specific inspiration.)

As tax season imminently approached, it became equally obvious that a tool for personal portfolio tracking would be of great use—particularly for doing capital gains calculations, for which the past couple of years I’d been employing a commercial web-based tool. The regression analysis thus took a back seat and focus turned to portfolio support. Work ensued for a couple of months, took a hiatus until spring 2022, and proved ready for general testing by March 2023.

Functional goals

There were several related (though not necessarily interdependent) jobs I foresaw for Tradesy at its outset in 2021:

  1. Real-time and historical stock market information: a replacement for Apple Stocks.app and/or the Yahoo Finance web site, providing fast and easy daily market information as well as historical market numbers over arbitrary date ranges.
  2. Regression analysis for speculative algorithm-based trading: a means by which to validate profitable hypotheses for trading, by applying various user-adjustable parameters to historical market data and assessing the nature and stability of the outcomes.
  3. Mac-native interface for trading platforms: for example, Wealthsimple Trade offers a mediocre iOS app, and recently a web app, but no Mac app.
  4. Automated trading: executing on a combination of the preceding two features to perform new trades in real time based on current market data.
  5. Adjusted cost base calculator: streamlined calculation of capital gains for trading conducted over the year, as necessary for Canadian income tax, which isn't necessarily straightforward.

Principles of operation

Tradesy currently employs the Yahoo Finance REST API, which although not publicly documented seems to work reliably (…for now).

The program architecture is such that adding or changing different back-end providers in future (for both market data and trading actions) is straightforward.

Part of the design philosophy was to minimize hits against the network service (Yahoo) as much as possible. To this end, a local cache stores all the inbound quote results; when new requests are made for a particular date range the cache is hit first, and only those ranges not covered by the cache are sent over the network. This means that subsequent fetches for a given data set (or subset thereof) should incur no network hit.

Future plans

Aspirational future improvements include: