Member-only story
Quantitative Trading — Volume Reversal Strategy
Let’s discuss a strategy based on two technical indicators called 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 in absolute basis is greater than 100 days Standard deviation of price chance.
Condition 2: Average volume traded between last 1 to 5 days is less than Average volume traded between last 5 to 10 days
Entry Condition: If both of the above two conditions are satisfied then, we will –
- Enter long if 5 day’s 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 5th day.
Let’s try this strategy on Vedanta using Python. First, we will import the necessary libraries. We shall be using 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
Then our second obstacle will be making a small code to eliminate the…