Caculations based on conditions

Closed
Peter - Jul 26, 2009 at 07:41 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 27, 2009 at 06:12 AM
Hello,

im writing in regards of how to caculate the change in absolute value from two given values if certain conditions are met. For instance,
If the price from the past 7 days worth of data for XYZ stock is as shown below
Day Price
1- 51----
2- 55----
3- 61----
4- 57----
5- 52----
6- 49----
7- 58----
and say the corresponding hypothetical volatilty for each day was

Day Volatility
1- 4----
2- 5---- -(change in absolute value in price given above from day 1 - 2 )
3- 4----
4- 6---- -
5- 6---- (
6- 8---- change in absolute value in price given above from day 3 - 7
7- 5---- ) -

and the objective was to find the change in absolute value of price when volatility >= 5, what would be the respective excel formula (s) to do so?
(i have highlighted in BOLD font on the days where the volatility >= 5)

Thanks,
Peter

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jul 27, 2009 at 06:12 AM
your data is in column A abd B,as given below. InC2 (NOT IN C!) copy paste this formula
=IF(B2>=5,ABS(A2-A1),"")
copy C2 down. see the values in col. C below

price volatality
51 4
55 5 4
61 4
57 6 4
52 6 5
49 8 3
58 5 9
0