+ Reply to Thread
Results 1 to 2 of 2

Profit /loss calculations

  1. #1
    Forum Contributor
    Join Date
    05-14-2007
    Location
    London
    MS-Off Ver
    office 365
    Posts
    118

    Profit /loss calculations

    Hi hope someone can help

    I wish to work out the profit and loss on my trades so i can test my strategies

    In simple terms i have the following table:

    A,B,C,D

    Date,price,signal,P/L

    4/4/07,800,buy
    5/4/07,810
    6/4/07,815
    7/7/07, 818
    8/7/07, 816, sell, 16
    9/7/07 ,810
    10/7/07, 800
    11/7/07 , 795, buy, 21

    So i would like to have a formular which works out the P/L in column D
    Column C can have either buy, sell , or be blank.
    If a sihnal is generated the price is taken in column B and at some time in the future a opp signal will close the trade whereupon the calculation woukd work out the diff in the price taken initially say in the eg above on the 4/4/07 buy signal 800 would be used as the price and then this would be clossed on the 8/7/07 with the sell signal for a profit of 16 ie 816-800. At this point a new order is opened as well ie a sel at 816 which is clossed on the 11/7/07 at 795 for a profit of 21.

    Each p/l calculation is seen as a pair of opp signals ie either buy closed by a sell signal or sell clossed by a buy signal. When the close signal is given it also opens a new order ie buy clossed by the opposite sell for p/l calculation opens new sell order which will be clossed in the future with the opp buy signal. which as well as clossing the trade opens a new buy order etc.

    If a signal lets say buy is opened if on future days a blank cell or even another buy signal is generated then these are ignored as the trade can only be clossed be the oppsite order ie a sell order in this case.

    hope someone can help

    thank you

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    I guess that this formula in column D will calculate as desired (paste into D2 and copy down)

    Please Login or Register  to view this content.
    Martin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1