Technical Indicators

Stock market data is usually prices for a particular stock. For each epoch of time, the max, min, volume of trade, and final price for the day is listed. An adjusted price may be listed at extra charge (accounting for stock splits). More information can be derived from these prices through the use of technical indicators (TI). TIs are measures to describe the trading activity of a security. The following are examples of properties TIs measure:

  • Trend (price going up, down, nowhere)
  • Momentum (price will go or down very hard or soft)
  • Volume
  • Volatility

Below is a small informal review of TI libraries from github:

Each library implements the same pattern, a long list of functions that takes as input the requisite data and outputs the numerical value for the technical indicator.

Choosing a source of market data

I just took a class on machine learning for trading and now I’m itching to set up my own algorithms and make bank. The first problem I need to solve is getting data. My choices are:

  • Quandl
    • $30 a month for US equities data
    • open brokerage account, get free data
    • commision free trading for stock and etf
  • Interactive Brokers
    • open brokerage account, get free data
    • commision free trading for stock and etf (see IBKR lite)
  • AlphaVantage
    • free data on stocks, forex, TIs
    • rate limit 5 api calls a minute, max 500 calls a day

I’m going to go with for now. Alpaca supports paper trading and executes trades on IEX. I like the concept of the IEX and its attempt to reign in high frequency trading advantages. That’s one less advantage the big wigs have.

If I decide to go broke trade options, I will consider Interactive Brokers because of its wide selection of markets. Since Charles Schwab decided to compete with Robinhood and cut commissions, offerings for non-professional traders have been improving significantly. Many competitors including E-Trade, Ameritrade, Interactive Brokers are following suite and offering commision free stock and ETF trading.

Cross Origin and Github

I host this blog using Github Pages. Some resources such as CSS and JS are hosted external and others with the same origin. I encountered some CORS errors with CSS files hosted on Github Pages. There were no “Access-Control-Allow-Origin: *” HTTP headers being passed. The Hugo template I am using, hugo-flex, adds crossorigin attributes when loading the base css stylesheet. Github uses Varnish for serving up pages. Removing the attributes let the CSS files be served without CORS error. It is now magically working with the crossorigin attributes added. Strange voodoo happening here.