Announcement

Collapse
No announcement yet.

5 Year / 10 Year Spread

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

  • 5 Year / 10 Year Spread

    Hi,

    I would like to create a chart on 5 year / 10 year spread in $ value. How can I convert the price into $ value of the contract?.
    For Example FV U4 = 108010 = $108,031.25

    Thank you for your assistance.

  • #2
    Hi,

    Please take a look at this FAQ on spreads and see if it addresses your needs. You won't need an EFS if this fits the bill.

    With 7.6, you can now also enter these spreads in a Quote Window or QuoteBoard (contrary to the note at the bottom of the FAQ - which needs to be updated).

    Thanks.

    Comment


    • #3
      Thank you for the quick reply

      Hi Scott,

      unfortunatly that page doesn't solve the problem. FV u4 can't simply be multiplied by the tick value for example 10801 = 108* 1000 and 01/32 * 1000. which will be 108,031.25 in $ value. Looking forward to your reply.

      Thank you.

      Comment


      • #4
        BTS
        Try the enclosed efs. This will write to the Cursor Window the $ value of the Close for each bar.
        The efs will also work with spreads such as for example FV U4 -TY U4 if you have version 7.6 or later since spreads are now plotted in the correct price format instead of decimals
        For some reason that I have yet to understand it will give the value with the correct decimals on all intraday bars whereas on daily it will show the correct value on the current bar and will round up to the nearest decimal the historical values
        Hope this helps
        Alex

        PHP Code:
        function preMain(){

        setPriceStudy(true);
        setStudyTitle("$ Value")
        setCursorLabelName("$ Value");

        }
        function 
        main(){

        var 
        = (close(0).toString())*1000;

        return 
        x+"";

        Comment


        • #5
          Thx Alex

          Hi ALex,

          Thank you for the formula I will give it a try. Also If I wanted to create this spread chart based on Net change on the day I think it will be alot simpler. FV u4 - TY u4 based on their net change on the day. Then I can try to multiply the result with the tick value. Do you have any formulas that I can use?..

          Thank you again for your assistance

          Comment


          • #6
            BTS
            Try the enclosed efs which will calculate the $ values of the difference of the daily Net Changes.
            Note that these values will be rounded up to the nearest decimal because of the issue I described in my prior message.
            Alex

            PHP Code:
            function preMain(){

            setPriceStudy(true);
            setStudyTitle("$ Spread Value")
            setCursorLabelName("$ Sprd Value");

            }

            function 
            main(){

            var 
            = ((close(0,"FV U4,D")*1)-(close(-1,"FV U4,D")*1))*1000;
            var 
            = ((close(0,"TY U4,D")*1)-(close(-1,"TY U4,D")*1))*1000;
            var 
            = (x-y).toFixed(6);

            return 
            z+"";

            Comment


            • #7
              BTS
              The attached efs is a revised version of the first one I posted in this thread.
              This version now displays the correct values (ie not rounded) also on daily charts.
              Alex
              Attached Files

              Comment


              • #8
                BTS
                Attached is a revision to the efs that computes the net changes of the 5 and 10 year Notes and calculates the dollar values of the spread.
                This version now displays the correct values (ie not rounded) also on daily charts.
                Alex
                Attached Files

                Comment


                • #9
                  The attached revision of the $value Bonds-Notes.efs fixes an error that occurred when Bonds or Notes prices were less than 100.
                  Alex
                  Attached Files

                  Comment


                  • #10
                    The attached revision of the $spread value Bonds-Notes.efs fixes an error that occurred when Bonds or Notes prices were less than 100.
                    Alex
                    Attached Files

                    Comment

                    Working...
                    X