Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel "price-stop" formula


I need an MS Excel formula that backtests a set of prices and computes
loss/gain using specific price stops.

I have downloaded historical stock prices into an Excel spreadsheet. I
need a formula that computes the potential gain or loss for a stock
using specific price stops based on an initial entry point. For
instance, if I buy IBM @ 100, using a price stop of +/- 5%, I want the
formula to compute whether the position realized a gain or loss over a
specific time period using end of day price data. Ideally the formula
will identify and compute the gain/loss based on the first price stop
during a given time period. For example, with an entry price of 100,
if IBM hits 105 at the beginning of a time period, and falls to 95
later in the time period, the formula should recognize the first price
stop – at a profit of 5%. Ideally, I would also like the formula to
compute a series of pre-defined stop prices, let’s say sell half the
position at a stop of +/- 5%, and the other half when the price hits
+/- 10%. Thank you.


--
ExcelKat
------------------------------------------------------------------------
ExcelKat's Profile: http://www.excelforum.com/member.php...o&userid=35169
View this thread: http://www.excelforum.com/showthread...hreadid=549384

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel "price-stop" formula

=IF(INDEX(A1:A365,SMALL(IF(ABS(A1:A365-StartPricesheet!A1)=5,ROW(A1:A365)),1),1)-StartPricesheet!A10,"gain","Loss")

entered with Ctrl+shift+enter

should get you started.

--
Regards,
Tom Ogilvy


"ExcelKat" wrote:


I need an MS Excel formula that backtests a set of prices and computes
loss/gain using specific price stops.

I have downloaded historical stock prices into an Excel spreadsheet. I
need a formula that computes the potential gain or loss for a stock
using specific price stops based on an initial entry point. For
instance, if I buy IBM @ 100, using a price stop of +/- 5%, I want the
formula to compute whether the position realized a gain or loss over a
specific time period using end of day price data. Ideally the formula
will identify and compute the gain/loss based on the first price stop
during a given time period. For example, with an entry price of 100,
if IBM hits 105 at the beginning of a time period, and falls to 95
later in the time period, the formula should recognize the first price
stop €“ at a profit of 5%. Ideally, I would also like the formula to
compute a series of pre-defined stop prices, lets say sell half the
position at a stop of +/- 5%, and the other half when the price hits
+/- 10%. Thank you.


--
ExcelKat
------------------------------------------------------------------------
ExcelKat's Profile: http://www.excelforum.com/member.php...o&userid=35169
View this thread: http://www.excelforum.com/showthread...hreadid=549384


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop "global" hyperlinks changing to "local" links? Em Excel Worksheet Functions 2 August 26th 08 01:18 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM
Can I automaticly figure "cost" and sale price in Excel? txwatkinsman Excel Worksheet Functions 1 February 25th 06 11:15 AM
Stop users from accessing "Protection" option from "Tools" menu I Believe Excel Programming 2 December 19th 05 02:44 PM


All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"