Index out of range when dumping Market Cap for certain stocks
Author: deepbuyer
Creation Date: 1/2/2010 10:25 PM
profile picture

deepbuyer

#1
I have modified the script that dumps quotes as ASCII by adding a field for the market cap. I get "index out range" for stocks like AMZN and GOOG, while stocks like AAPL seem to work. what's wrong with me?

i took the original script from here http://www2.wealth-lab.com/WL5WIKI/Default.aspx?Page=kbExportDataFromWL5&AspxAutoDetectCookieSupport=1

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Scroll down to Index was out of range in WL5 Wiki KB > Errors | Strategy.
profile picture

deepbuyer

#3
* accessing the data at an invalid bar number. Example: your trading loop starts at bar 3, and you're trying to compare the close of the bar with the close of the bar-4.
* accessing the data that does not exist. Example: your DataSet contains the price data for a symbol that stopped trading, and you select the data range that goes beyond that date, and do not account for this fact in your Strategy.
* accessing a Position that does not yet exist

CODE:
Please log in to see this code.
works for the problem stocks so Bars.Count is one source of the trouble.
commenting out dsRatio[bar] in the Writeline also works, so the problem is with the market cap not being available for some bars for certain stocks when the script is executing or something like that (i am guessing). so, how do i fix this? i can see the market cap being charted so the data is there.

you guys have a happy and prosperous NEW YEAR!
profile picture

Eugene

#4
Please create a support ticket for a quick question. tia.
profile picture

deepbuyer

#5
the bug is confirmed in WLP 5.6 (I am probably gonna get banned for this report :))
profile picture

deepbuyer

#6
i am just messing with you, Eugene!

actually i opened a fidelity account a few months ago, but i have not tried negotiating rates with them. the money is just sitting in cash (what a waste!), but i don't feel like placing 8$ trades.
profile picture

Eugene

#7
Who confirmed it?? We did not.

Your code runs in WLP 5.6 w/o a problem. Of course, if you don't attempt to export the data series on dates where they did not exist. If you give it a thought, I already gave you all the necessary information to fix the self-proclaimed "bug".

P.S. But that's a good idea -- to ban users for reporting bugs :) Any software product will probably then look perfect and bug-free. Good PR move ;)
profile picture

Eugene

#8
QUOTE:
the money is just sitting in cash (what a waste!), but i don't feel like placing 8$ trades.

Having to place 120+ $8 trades to get the WLP entitlement must be a bigger waste? ;)
profile picture

deepbuyer

#9
QUOTE:
Eugene.
1/3/2010 3:46 PM

the money is just sitting in cash (what a waste!), but i don't feel like placing 8$ trades.

Having to place 120+ $8 trades to get the WLP entitlement must be a bigger waste? ;)


now that you are cutting down on support for the free-loaders it may make more sense.

BTW, 120+ x$8 are not all the costs for WLP. The capital that could be used more efficiently elsewhere gets tied up at Fidelity. if somebody has a strategy that trades frequently but for a low profit per trade, they can't run it at Fidelity. So, there is a loss of opportunity to multiply the capital efficiently, hence, added (indirect) costs to WLP.

A suggestion I have for WLD is that you guys should try to negotiate with Fidelity to get access to their streaming data through WLD. This would make WLD more appealing because, as I understand, right now there are substantial costs to get external streaming quotes if one gets WLD.

For example, I could get WLD due to my European roots, but adding external quotes seems like high extra costs.
profile picture

Eugene

#10
QUOTE:
A suggestion I have for WLD is that you guys should try to negotiate with Fidelity to get access to their streaming data through WLD.

If you were Fidelity, would it make sense to you to steal the spotlight from your flagship product (WLP) by granting access to premium content (i.e. Fidelity data) to those who don't even necessarily trade the US markets (i.e. international customers)?
QUOTE:
substantial costs to get external streaming quotes if one gets WLD.

Why? To some it looks like substantial savings (for not having to tie up capital, negotiate about rates etc.) and the choice between data vendors (of course, when our own static/streaming data providers hit the street).
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).