Bloomberg BQL - can anyone spot the error

Discussion in 'Strategy Building' started by Maverick2608, Oct 8, 2022.

  1. =BQL("AAPL US Equity","rolling(avg(dropna(px_volume(dates=range(-30d,0d)))),iterationdates=range(-1y,0d))")

    Excel will not accept it. Can anyone spot the error?
     
  2. I found the error. "," should be substituted with ";" apparently.
     
  3. I want to change this formula so it returns just one figure = average 30 day volume for at specific date.

    How should the formula look like to achieve that?
     
  4. I found out. Just needed to use the right date format.

    Thanks for the support ;-)
     
    Sekiyo likes this.
  5. M.W.

    M.W.

    Don't you make this way too complicated? Bbg has already metrics it updates on its servers for 21d and I think even 30d avg volume. Just search within the api wizard for average volume and you will find it.
     
  6. Yes, unfortunately Bloomberg confirmed that they are not historically available (even though the 30 day average is indicated as being historically available), so I have to program it.
     
  7. M.W.

    M.W.

    Hmm, strange, I thought to remember they offer at the very least the historical 21d one... Oh well...

     
  8. I will check the 21D again. Thanks.
     
  9. No, "VOLUME_AVG_20D" is not historical either.
     
  10. M.W.

    M.W.

    What is it then?

     
    #10     Oct 10, 2022