Member-only story

Quantitative Trading — Volume Reversal Strategy

Amit Kumar Ghosh
5 min readAug 29, 2023

--

Let’s discuss a strategy based on two technical indicators called the Volume Reversal Strategy in quantitative trading. Through this strategy, we will be able to identify the points of significant price movements accompanied by a decrease in trading volume. Let’s frame the strategy in an algorithmic note –

Condition 1: 5 day’s price change on an absolute basis is greater than 100 days' Standard deviation of price change.

Condition 2: Average volume traded between the last 1 to 5 days is less than Average volume traded between the last 5 to 10 days

Entry Condition: If both of the above two conditions are satisfied then, we will –

  • Enter long if 5 days’ absolute price change is negative
  • Enter short if 5 day’s absolute price change is positive

Exit Condition: If any of the below two conditions are triggered then we exit.

  • Exit if a counter signal is generated.
  • Exit at the end of the 5th day.

Let’s try this strategy on Vedanta using Python. First, we will import the necessary libraries. We shall be using the nsePY library made by Swapnil Jariwala.

import time
start_time = time.clock()
import datetime
import csv
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from nsepy import get_history
#pip install lxml

--

--

Amit Kumar Ghosh
Amit Kumar Ghosh

Written by Amit Kumar Ghosh

Aloha, I’m Amit Ghosh, a web entrepreneur and avid blogger. Bitten by entrepreneurial bug, I got kicked out from college and ended up being millionaire!

No responses yet