Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Capital requirement calculation in backtesting and possibly optimization.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Capital requirement calculation in backtesting and possibly optimization.

    Hello,

    Has a request to include a capital requirement calculation in backtesting and possibly in optimizations ever been created? I do not see a mention of one when I search through the forum.

    Here is an example of what I am curious about:

    If I were running a backtest on a strategy using the ES as the instrument.

    Intraday margin per lot: $500
    Lots: 2
    Margin requirement: $1,000
    Max drawdown for all trades: 10 ticks at $25 (2 lots * $12.50) per tick or $250
    Total minimum required account capital: $1,250

    The final value of $1,250 is all I am interested in having displayed in the Summary of a backtest. It is similar to the average MAE but it would provide a very useful metric when testing strategies.

    I can use loss limit logic including margin requirements in a strategy to test whether the limit is exceeded, but that does not provide the most straightforward value.


    An option in the optimization to be able to solve for minimum account capital required to trade a strategy based on a set of parameters would be very helpful too.


    Thank you for any info.



    #2
    Hello 9817_dynamic,

    Thank you for the post.

    You may be able to do by using a custom PerformanceMetric, that would be able to display in the results view of a backtest. Performance metrics need to be enabled in the options menu before they will appear in the backtest. There is a sample cumulative profit metric you can use to learn about this type. The calculation you want would generally be possible, you can add variables for the margin values and access the targetMetrics.TradesPerformance.Currency.Drawdown for the drawdown of the trades.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Oh that's good to know, thank you! I created a user input for an instrument's per lot margin value and just built that value, multiplied by the position quantity, into loss limit logic I added to my strategy for testing purposes. I will definitely look at the drawdown value though. I have tried to look through the entire Help Guide for all available options, but it seems new possibilities pop up in references almost every time I go to add something to my strategies.

      Thank you for the info!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,403 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      7 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X