The ACD Method

I think I saw a program similiar to qcollector for collecting IB data. I think that it was no longer supported though. If you plan to do this for the long haul you might just want to pay for the esignal/qcollector combo. It is pretty awesome.
I use esignal with Qcollector currently and agreed its a great program however, it would probably be not to much work to create your own version using IB Api and have it update straight to a database rather than using all the csv files, as Collector uses. A huge slowing point on my original NL code was the importing of each individual csv file for analysis. By using a database instead I shaved huge amounts of time off processing time.
 
Really easy you just have to dig into IB API. In R if you run the code;

require(IBrokers)
args(reqHistoricalData)

You will see that theres an argument called "duration". According to documentation here;

The duration string must be of the form ‘n S’ where the last character may be any one of ‘S’ (seconds), ‘D’ (days), ‘W’ (weeks), ‘M’ (months), and ‘Y’ (year). At present the limit for years is 1.

* Note that the argument has got to be a character string so you need the "" around the value.

So for example using duration = "2 D", will tell the function to pull only the last 2 days of data off rather than all 90 days in your case.

You could use the reqHistoricalData inside another function, but get R to extract the last date from your DB and compute days from current date to date of last entry in DB, then create a variable for the duration argument of this value which would then only pull required data.

I decided to post this here so that it may be of help to others in similar situation.

Red, you have been so helpful...I cannot thank you enough. I think in my earlier versions of my script and reHistoricalData, I did make use of the duration argument. However, say I downloaded the last 90 days and the last time I ran the script was June 20th; can I run the script with a "8 Day" duration to just pull the last 8 days. This would bring me to Jun 28th. How would I tell R to join these two data together since they are written in two data frames. Is it a matter of just merely merging the two?
 
Red, you have been so helpful...I cannot thank you enough. I think in my earlier versions of my script and reHistoricalData, I did make use of the duration argument. However, say I downloaded the last 90 days and the last time I ran the script was June 20th; can I run the script with a "8 Day" duration to just pull the last 8 days. This would bring me to Jun 28th. How would I tell R to join these two data together since they are written in two data frames. Is it a matter of just merely merging the two?
Yes exactly if you use "8 d" as a duration the previous 8 trading days will be pulled. You can then use union from the dplyr package which will bind only new rows from y to x. Heres a god explanation of that function.
 
Euro about to hit 1.15....what is your opinion Mav. Will this put a cap on equities?

I think there is definitely a switch to European equities with the strong Euro tailwind. This has somewhat suppressed demand for US equities. I think what ultimately is capping us equities is low growth.
 
Yes exactly if you use "8 d" as a duration the previous 8 trading days will be pulled. You can then use union from the dplyr package which will bind only new rows from y to x. Heres a god explanation of that function.

Thanks again Red. Will definitely play around with that this weekend.
 
I think there is definitely a switch to European equities with the strong Euro tailwind. This has somewhat suppressed demand for US equities. I think what ultimately is capping us equities is low growth.


U.S. Credit is being cut off from the bottom to the Fortune 500. Used car dealerships are now required to submit borrowers close to prime for any bank lending.
Visit any non Fortune 500 company, and you'll see it's virtually impossible to get credit without collateralizing the whole company.
It's not so much the growth, because growth is a product of lending in our quasi capitalist economy.

If there is no credit, risk-off policies by banks begin and we go back to 2007-2009, all over again.
 
More Steenbarger:

"The recent article I wrote for Forbes is perhaps the most important one I've written. It is about a trend that is sweeping the trading world. Yes, we talk about algos and quantitative trading, factor-based investing, and passive index strategies and all of those are helping to reshape the landscape of finance. The broader revolution, however, is one in which financial decisions are evidence-based".

"The alternative to technical analysis is not fundamental analysis. The alternative to technical and fundamental analysis is evidence-based decision-making.

Think of it this way: the emerging perspective says that if less research rigor goes into your trading and investment decisions than your decision to buy a new car, something is very wrong."

-------------------------------------------------------

"It is no coincidence that those currently winning in financial markets are operating with a higher degree of rigor and quantification than their peers. Evidence takes the con out of our investment confidence."
 
Last edited:
More Steenbarger:

"The recent article I wrote for Forbes is perhaps the most important one I've written. It is about a trend that is sweeping the trading world. Yes, we talk about algos and quantitative trading, factor-based investing, and passive index strategies and all of those are helping to reshape the landscape of finance. The broader revolution, however, is one in which financial decisions are evidence-based".

"The alternative to technical analysis is not fundamental analysis. The alternative to technical and fundamental analysis is evidence-based decision-making.

Think of it this way: the emerging perspective says that if less research rigor goes into your trading and investment decisions than your decision to buy a new car, something is very wrong."

-------------------------------------------------------

"It is no coincidence that those currently winning in financial markets are operating with a higher degree of rigor and quantification than their peers. Evidence takes the con out of our investment confidence."


Yeah I really hate when technical analysis gets thrown in the same category as quantitative analysis. Technical analysis is like religion, you can't prove it works, you just believe it does. Quantitative analysis "proves" it works using statistical analysis.
 
I use esignal with Qcollector currently and agreed its a great program however, it would probably be not to much work to create your own version using IB Api and have it update straight to a database rather than using all the csv files, as Collector uses. A huge slowing point on my original NL code was the importing of each individual csv file for analysis. By using a database instead I shaved huge amounts of time off processing time.
rebaron, do you primarily use QCollector to extract data from eSignal for timeframes lower than daily? E.g., 5 min, etc - data suitable for calculating NL lines.
 
Back
Top