Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Balance, order size, stop loss, open and close position price

    Support
    2
    6
    295
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      ScalpingAF last edited by

      Hello. Nice to meet you and thank you for your backtester application. I've looked into your documentation but unfortunately I still have several questions. I hope you can help me with it.

      1. As I understood, when calculating "weights" I should operate by positive and negative numbers as an order of position size. Everytime in your examples you use 1 or -1, and as I understood, it means we will buy 1 contract or sell 1 contract, am I right? If I'd like to buy 10 contracts, I should mark "10"?

      2. If I need to close a current open position, should I mark 0 in a "weights"?

      3. How do you calculate close position price? Can I send to backtester my close price? As I understood, you just use a candle close price?

      4. How do you calculate open position price? Is it an open candle price? Can I mark my open price? For example, it can be the price inside the current candle - breaking through the price level.

      5. In my strategies I use a stop loss. To calculate it I need to know the balance. How can I get info about balance using your framework or how should I correctly init it? It's also needed to calculate an order position size.

      Thank you for your attention.

      S support 2 Replies Last reply Reply Quote 0
      • S
        ScalpingAF @ScalpingAF last edited by

        1. As I understood, when calculating "weights" I should operate by positive and negative numbers as an order of position size. Everytime in your examples you use 1 or -1, and as I understood, it means we will buy 1 contract or sell 1 contract, am I right? If I'd like to buy 10 contracts, I should mark "10"?

        Also a question about order size.
        If we are talking about Bitcoin. How do you operate with size? Is it a amount of contracts or amount of coins?

        support 1 Reply Last reply Reply Quote 0
        • support
          support @ScalpingAF last edited by

          @scalpingaf Hello, thanks for asking.

          1. As I understood, when calculating "weights" I should operate by positive and negative numbers as an order of position size. Everytime in your examples you use 1 or -1, and as I understood, it means we will buy 1 contract or sell 1 contract, am I right? If I'd like to buy 10 contracts, I should mark "10"?

          -> No, the weights are the allocations to a given asset. In other words, a weight of 0.1 means a 10% allocation to a given asset. In case the sum over absolute weights is larger than 1, we normalize it to 1. No leverage is allowed.

          If I need to close a current open position, should I mark 0 in a "weights"?

          -> Yes, correct.

          1. How do you calculate close position price? Can I send to backtester my close price? As I understood, you just use a candle close price?

          -> We provide a pre-defined close.

          1. How do you calculate open position price? Is it an open candle price? Can I mark my open price? For example, it can be the price inside the current candle - breaking through the price level.

          -> Good question. No, we just provide a single value for the open price.

          1. In my strategies I use a stop loss. To calculate it I need to know the balance. How can I get info about balance using your framework or how should I correctly init it? It's also needed to calculate an order position size.

          -> That is possible, as the backtester can be used with a "stateful" version which knows the balance, but not intraday, that can be checked at the end of the trading session only.

          1 Reply Last reply Reply Quote 0
          • support
            support @ScalpingAF last edited by

            @scalpingaf Also for Bitcoin, the exposure is the fractional allocation for the capital allocated to Bitcoin.

            S 1 Reply Last reply Reply Quote 0
            • S
              ScalpingAF @support last edited by

              @support , thank you for your answers.
              I have additional questions:

              1. Do you use an open candle price for opening a new position, right?
              2. I didn't get how you close the position. If I'll send "weight" = 0, backtester will choose an open candle price for closing current position, right?
              support 1 Reply Last reply Reply Quote 0
              • support
                support @ScalpingAF last edited by

                @scalpingaf Correct, all trades (buy or sell) are taken at the open of the next day you take the decision.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB | Contributors
                • Documentation
                • About
                • Career
                • My account
                • Privacy policy
                • Terms and Conditions
                • Cookies policy
                Home
                Copyright © 2014 - 2021 Quantiacs LLC.
                Powered by NodeBB | Contributors