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 DanielTynera, Today, 01:14 AM
      0 responses
      2 views
      0 likes
      Last Post DanielTynera  
      Started by yertle, 04-18-2024, 08:38 AM
      9 responses
      40 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by techgetgame, Yesterday, 11:42 PM
      0 responses
      10 views
      0 likes
      Last Post techgetgame  
      Started by sephichapdson, Yesterday, 11:36 PM
      0 responses
      2 views
      0 likes
      Last Post sephichapdson  
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,615 views
      0 likes
      Last Post aligator  
      Working...
      X