+ Reply to Thread
Results 1 to 7 of 7

Daily Profit Factor

  1. #1
    Registered User
    Join Date
    11-11-2019
    Location
    Scottsdale, AZ
    MS-Off Ver
    Office 365
    Posts
    19

    Daily Profit Factor

    I am trying to get the correct daily profit factor formula to work. The problem I am running into is when there is just one trade and it is positive. I attached the file.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Daily Profit Factor

    It appears that your daily profit factor formula is basically the ratio of the positive trades to the negative trades. dpf=sum(positive trades)/sum(negative trades). For a day with a single trade, either sum(positive) or sum(negative) will be 0 (and for other days when there are multiple trades but all of one type such as march 27 where there are two trades and both are positive).

    As near as I can tell, the current calculation is correct, and this behavior (sometimes returning 0 or #Div/0) is simply a feature of this definition of daily profit factor. A quick internet search did not find anybody who talked about an alternate definition for profit factor when either gains or losses are 0. "Fixing" this probably needs to start by explaining to us how you want to define profit factor when either sum is 0. Once we know how you want to calculate profit factor when either gains or losses is 0, we should be able to help you program that calculation into the spreadsheet.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    11-11-2019
    Location
    Scottsdale, AZ
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Daily Profit Factor

    Profit factor is the sum of all the profitable trades / negative trades.

    The week from 4/1 - 4/5, the profitable trade total was $30,437
    The week from 4/1 - 4/5, the negative trade total was $5,465
    This gives the weekly profit factor 30,437 / 5,465 = 5.57

    I would like to show 0.00 if there was one trade with negative profit and show 100.00 if there was one trade with positive profit.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Daily Profit Factor

    What errors is the IFERROR() function intended to trap? If the #Div/0 error is the only error that you ever expect, you could simply change your current IFERROR() to =IFERROR(calculation,100).

  5. #5
    Registered User
    Join Date
    11-11-2019
    Location
    Scottsdale, AZ
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Daily Profit Factor

    That will not work because if there is a day where there are no trades, it still puts 100 as the Profit Factor

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Daily Profit Factor

    It would appear, then, that you need to add an IF() test to see if a given day has no trades. =IF(COUNTIFS(Q:Q,V3)=0,"no trades",IFERROR(...))

  7. #7
    Registered User
    Join Date
    11-11-2019
    Location
    Scottsdale, AZ
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Daily Profit Factor

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pivot table profit and loss by month - calculate gross profit and gross profit %
    By parkviewfinance in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-26-2020, 02:34 AM
  2. [SOLVED] Trying to pull daily profit to overall sheet
    By Gladoo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-02-2018, 02:59 PM
  3. [SOLVED] Formula to work out daily profit
    By fumusic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-08-2017, 02:58 PM
  4. [SOLVED] Daily profit / loss oil trucking
    By dw_22801 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-04-2016, 04:57 PM
  5. Muliplying Daily Numbers by a Monthly Factor
    By ashleys.nl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2011, 02:20 PM
  6. Replies: 2
    Last Post: 01-09-2010, 04:06 AM

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