Menu

Intraday data

Ben
2007-08-20
2013-04-03
  • Ben

    Ben - 2007-08-20

    Chris,

    I noticed that you have started some work on intraday tables. 

    You have the following lines in the sql.

      qprice        FLOAT            NOT NULL,
      qvol          FLOAT            ,
      qoi           FLOAT            ,

    It is particularly useful to store the side of the trade, which you cannot do at the moment.  If bid volume and ask volume data is unavailable then it would be necessary to have the qvol field.  In which case the following implementation would probably allow all possibilities:

    qvol FLOAT,
    qbidvol FLOAT,
    qaskvol FLOAT,

    Thanks

    Ben Glazier

     
    • christian

      christian - 2007-08-20

      Hi Ben

      What you see is the tick table. A tick have no side a tick is a trade done at a price  where seller and buyer are happy with. what you want is the intquote table. I just feed the last trade price from yahoo into the tick table

      If you want to make a openTick provider please have a look at the docs on the new fimi "homepage" http://fimi.sourceforge.net/ . Now there is a daemon up and running but you can use the openTick triggers to feed data as well (just alittle more work :-)  ).

      To get the proce data from fimi you should use the indicators (find them via select * from fimi.indicator; and select * from fimi.indicator_rettype). I have allready build the function to get bars from intraday tick data my_inttick2bar. For now there are only whole days as the interval. I am on the work ... but there is one more problem, I am not sure how to calculate the volume into a bar.

      CU
      Chris

       
    • Ben

      Ben - 2007-08-20

      Chris,

      I just notice the quote table after I sent the post.  This was the approach I used in the begginning and I have to change it.  Using the quote data enables you to get the side of the trade/tick.  The problem I had was that it is not easy to merge these together afterwards to get the side of the trade/tick.  This is because many trade may occur in the same second, and so you don't know what quote goes with what trade/tick.  The other thing is that it is requires so much more processing.  I found it much better to keep track of the quotes and store the side along with the tick/trade data.

      Regards, 

      Ben

       
    • Ben

      Ben - 2007-08-20

      Chris,

      I am incorrect calling it the side of the trade.  You are correct, when you say "A tick have no side a tick is a trade done at a price where seller and buyer are happy with".  However, this trade will have occurred at either a bid quote or an ask quote.  That is what I meant by "side".

      I also sent you an e-mail on some other relevant stuff.

      Regards
      Ben.

       
    • christian

      christian - 2007-08-21

      Hi Ben

      when bid is 24,50 and ask is 24,70 the tick will never be 24,50 and never be 24,70. how could the broker or stockexchange life? when you buy you are allways on bid side and when you sell you all allways an ask side of the trade. but no problem this is why you have a real database instad of berkeley. just join the inttick to the intqoute table by fi, makret and time. the must be a quote before there can be a tick.

      Chris

      PS Look to your email later ...

       

Log in to post a comment.