New answers tagged programming
You'll want the ibrokers package, its very good and built on the c++ api. Also check out quantmod, performanceanalytics, quantstrat, and highfrequency package.
You'll want to adjust the contract inputs you're sending to IB secType should be CASH, exchange should be IDEALPRO, and add in whatToShow = "MIDPOINT" or "BID" or "ASK"
This is my experience (I am heading the Risk Analytics team for an investment bank in the City): We only ever bought the Optimization and Statistics toolboxes. You are better off writing any extra functionality yourself. Most of the stuff is simple, and writing it yourself improves your understanding and highlights potential pitfalls. Having said that, we ...
Another book is Bernhard Pfaff's Analysis of Integrated and Cointegrated Time Series with R (amazon.com). He emphasizes the Johansen method and error correction models, but also gives an empirical example of the Engle-Granger procedure, Code 4.2.
One of the simplest and most intuitive books covering cointegration is Applied Econometric Time Series by Enders. It would cover both Engle-Granger and Johansen (although not in so much detail). Another tried and true way of learning it is to go to the Eviews Help Manual. It has grown over the years and now is over 1000 pages. I used it when it was maybe ...
This is rather a long comment to your post. I think YEARFRAC version Act/Act has nothing to do with finance at all, probably it is a big bug. Also, I checked the link "Implementation of the YEARFRAC", the author of that page is not fully right either - "Property 1: Additivity" - day conventions need not be additive. Act/365L (and Act/Act-AFB) we sometimes ...
The answer is that you may use an approach that includes IRR, but that's not a necessary component of what I would consider a good model. I have seen commercial tools that include them and those that don't. I have also seen practitioners set the variables in packages that include this approach, so that they were not a relevant component of the resulting ...
In the E.P. Chan's Book, the author provided an example in which he tests a pair trading strategy on GLD (gold spot price) and GDX (gold industry stock index). All code examples are written in Matlab down in the book, but all of them are explained pretty well; each practical example is equipped with a full theoretical explanation. The example you need for ...
You can certainly use the Tradier API to do this. For delayed data you can use the Developer Sandbox for request/response. To access realtime data you’ll need a Tradier Brokerage account but you’ll have access to a realtime stream. You can find the streaming documentation here: https://developer.tradier.com/documentation/streaming/get-markets-events
Top 50 recent answers are included