Volatility adjusted position sizing

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #71875 quote
    Xav243Xav243
    Participant
    New

    Hello.

     

    I am currently coding a system for which I want to add a volatility adjusted position sizing, i.e. regardless of the type of market I want to risk the same dollar amount.

    On paper the formula is like this:

    (Equity * Risk %) / (ATR * $ per contract)

    so for example if I take the following paramaters

    Equity: 100 000 USD

    Risk%: 2%

    ATR: 25

    Market: S&p500 -> $/contract= $250

     

    The formula gives me:

    (100 000 * 2%) / (25 * 250) = 0.32 as a position.

    I could code the formula for the first 3 parameters but I am stuck with the $ per contract. I was unable to find any answer in the forum.

    Could anyone help me with this?

     

    Thanks!

    Xavier

    #71877 quote
    NicolasNicolas
    Keymaster
    Legend

    The “$ per contract” can be automatically retrieved with the POINTVALUE instruction.

    #71901 quote
    Xav243Xav243
    Participant
    New

    Thanks Nicolas.

    I saw the pointvalue function mentioned in several topics, however this functional gives the €/$ per point, but I need the one per contract/lot

    #71927 quote
    NicolasNicolas
    Keymaster
    Legend

    Since you can’t buy/sellshort less than 1 contract, the $/contract is POINTSIZE*POINTVALUE

    Xav243 thanked this post
    #71965 quote
    Xav243Xav243
    Participant
    New

    ok, clear. Thanks Nicolas!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Volatility adjusted position sizing


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Xav243 @xav243 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Xav243Xav243
8 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/31/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...