StockPrice
New Member
- Joined
- Dec 30, 2013
- Messages
- 1
I’m trying to create formula that will calculate the loss on a stock given certain conditions. I need to “cap” the loss based on the average price of the stock over the 90 day period after it drops. The cap will either eliminate the loss or lower it, depending on what the 90 day average price is.
An example:
The stock falls from $50 to $5.
If the 90 day average price is below $5, then the cap is moot, and the loss is (50-5=45)
If the 90 day average price is above $50, then the cap eliminates the loss (i.e. loss is 0).
If the 90 day average price is between $5 and $50, say it’s $35, then the cap partially reduces the loss and I get (35-5=30).
I have all the inputs, I’m just having trouble coming up with a formula which will return the correct answer under every condition listed above. I think it can be done using IF, AND, and possibly NOT statements, but I just can’t get it.
Thanks!
An example:
The stock falls from $50 to $5.
If the 90 day average price is below $5, then the cap is moot, and the loss is (50-5=45)
If the 90 day average price is above $50, then the cap eliminates the loss (i.e. loss is 0).
If the 90 day average price is between $5 and $50, say it’s $35, then the cap partially reduces the loss and I get (35-5=30).
I have all the inputs, I’m just having trouble coming up with a formula which will return the correct answer under every condition listed above. I think it can be done using IF, AND, and possibly NOT statements, but I just can’t get it.
Thanks!