-1

I am dealing with a dataset of Nifty 2019 which has only two columns - Date and Close. I want to find the days where it was volatile (high > 105% of low). I am trying to shift the values, store them in a different place, and assign them to a variable.

prev = nifty.Close.shift(1)

for i in nifty:
  for j in prev:
    open = nifty['Close']
    prev = prev['Close']

How do I find the days it was volatile?

1 Answers1

0

Lets say there is an array arr

import numpy as np
arr=np.array([[5,5,5],[3,3,3],[1,1,1]])
print(arr[0,:]-arr[1,:])   

This will simply subtract row 1 from row 0...

And will result

[2,2,2]