Free yet powerful trade flow profiling tools for intraday stock market analysis

Market profile, as its name suggests, is a tool to profile stock market intraday trade activities. It was introduced by CBOT trader J. Peter Steidlmayer. It shows how much time the trading session is spent on a particular price level. Similarly, the volume profile depicts how many shares have been transacted at a particular price.

As time and sales trade flow comes in during a trading session, market profile aggregates it over the price axis to produce useful statistical properties. …

Download free historical market data for stocks, commodity futures, foreign exchange, cryptocurrency, and intraday prices

Historical market data is essential for financial analysis and strategy backtesting. Professional data vendors sometimes are not an economically viable option for retail investors or startups. Fortunately, with the development of financial technologies or FinTech and the movement of inclusive finance, there are choices of free market data sources available online.

In this post, I’m going to discuss three of them and demonstrate how to get data with Python. The three data sources and APIs discussed here are:

  1. Yahoo Finance
  2. Pandas DataReader
  3. Quandl
  4. Interactive Brokers (Supplemental)

The discussion is not limited to daily stock market data but also commodity futures…

I decided to write a story discussing some machine learning practices in Finance I see online. There are a lot of articles and books about this topic. This post is different in that the concepts described here may not be completely correct or mathematically tight. It is just my current understanding of machine learning and data science, and I’m prepared to come back updating some concepts based on feedback and new developments.

Before machine learning, people used to tell computers what to do, for example, if price breaks n-day consolidation range, go buy at the breakout. …

This post demonstrates how to use reinforcement learning to price an American Option. An option is a derivative contract that gives its owner the right but not the obligation to buy or sell an underlying asset. Unlike its European-style counterpart, American-style option may exercise at any time before expiry.

American Option is known to be an optimal control MDP (Markov Decision Process) problem where the underlying process is Geometric Brownian motion ([1]). The Markovian state is a price-time tuple and the control is a binary action that decides on each day whether to exercise the option or not.

The optimal…

Letian Wang

Financial Markets and Quantitative Investing

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store