+ Reply to Thread
Page 1 of 3 1 3 LastLast
Results 1 to 10 of 27

Thread: Coding the Active Boundaries indicator

  1. #1
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24

    Coding the Active Boundaries indicator

    I have read chapter two "Price and value" a lot of times, and the expectation concept it is clear to me, the idea is very well explained and I found it very interesting.

    I would like to code it and I wonder if there is someone so kind to help me in how to proceed step by step: other than the book, I have searched through this forum and in the archive section too, and I found some info.

    The basis of the AB is clear, it is the average gain or loss of the last x million traded shares. But how to face the coding process?

    Let's suppose I have, in example, 1 minute data for the last 200 trading days of the stock Y.

    1) I have to find the TotalFloat, and this info is always known since is a public stock information, let's suppose TotalFlow = 100 million shares
    2) Subtract shares held from institutional or locked shares from this amount, i.e.20 millions so our float is now 80 million shares
    3) Ok now I have my 200 days 1 minute data and I can start building the Active Boundaries starting from 80 million fixed shares.

    How to proceed?

    My idea: starting with first data (the older one), I should find a window of rows where the total volume is <= 80 millions.

    Inside this window, for each closing price (i.e., for every minute), I should calculate the profit or loss compared to the last closing value.

    I am not sure if this is the right way to calculate the AB, so any help or suggestions are really very much appreciated.

    Thanks all

    Alberto

  2. #2
    AB is a very straightforward calculation, as far as you have the ActiveFloat right.

    If your activeFloat is 80M shares, then what you need to do is calculate the average price of the past 80M shares that have been traded and compare it to the price of the final minute of trading. That will be in percentage the average gain of shareholders measured at the final trading minute.

    Then, you go back one minute and do the same for the past 80M shares. In reality, there are only a few shares that are trading at a different price. You need to compute the small chnage and then go down one minute, for the last 6 months. That makes a lot of calculation, but the coding takes only a few lines.



    Pascal

  3. #3
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    So, if I understood correctly, here is an example:

    I have set the Active Float to 4 millions: the red rectangle hold the minutes so that its total volume is <= 4 millions.

    Calculate the average close price (1.3415) and then compared this average price with the latest close price (1.341).

    The result is -0.0348%. Is this process correct?

    Or should I have to calculate for every single close price inside this 4 millions rectangle and compare to the latest close price, and then take the average?

    Name:  ZA729.png
Views: 4133
Size:  55.4 KB

    Thanks

    Alberto

  4. #4
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    Is there anyone that has been able to properly code the Active Boundaries Indicator?

    I am not sure if my previous example is correct, is there anyone willing to help?

    Thanks.

  5. #5
    I think that what you are asking is technically too difficult for non-developers to come up with an easy response.
    The AB calculation is similar to a VWAP calculation. A VWAP uses the Volume to calculate the average price. (Volume weighted Average price.) AB also needs to use the number of shares that were exchanges at each price level: this is also a volume weighted average price and not a simple average price.

    Below is the minute data for the company X and the Active Boundaries graph as of last night.
    The best is that you try your different ideas and see which comes close to the pattern below.
    The, the answer will be obvious.


    Pascal

    Name:  X.gif
Views: 7414
Size:  12.3 KB
    Attached Files
    Last edited by Pascal; 08-05-2014 at 04:49 AM. Reason: Typos

  6. #6
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    Pascal,

    thank you very much for your support. The txt file and the plotted AB is what I need in order to have a reference for my developement.

    I will study the WVAP in details and will try to code the AB.

    Regards,

    Alberto

  7. #7
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    Quote Originally Posted by Pascal View Post
    I think that what you are asking is technically too difficult for non-developers to come up with an easy response.
    The AB calculation is similar to a VWAP calculation. A VWAP uses the Volume to calculate the average price. (Volume weighted Average price.) AB also needs to use the number of shares that were exchanges at each price level: this is also a volume weighted average price and not a simple average price.

    Below is the minute data for the company X and the Active Boundaries graph as of last night.
    The best is that you try your different ideas and see which comes close to the pattern below.
    The, the answer will be obvious.


    Pascal

    Attachment 25307

    Hi Pascal,

    I am working in coding the Active Boundaries, and in order to accomplish it as more correct as possible, I am asking if it is possibile to have the output of the Active Boundaries for the X company as from your previous graph.

    This would help a lot.

    Thanks

  8. #8
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    It seems I have been succesfull with my Java implementation for the Active Boundaries indicator

    Name:  ZA818.png
Views: 4041
Size:  60.7 KB


    Although your result it is smoother than mine (do you smooth the AB with EMA or any other filter?), the overall path seems quite similar


    Name:  ZA819.png
Views: 4054
Size:  62.2 KB

    I am using the second method you propose at pag.110

    Thanks

  9. #9
    Join Date
    Dec 1969
    Location
    New Jersey
    Posts
    189
    Congrats acepsut!

    Harry

  10. #10
    Join Date
    Mar 2013
    Location
    Reggio Emilia, Italy
    Posts
    24
    Quote Originally Posted by Harry View Post
    Congrats acepsut!

    Harry
    Thanks Harry.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts