Tag Info

Hot answers tagged

6

I guess what they are trying to say here is that, assume you have two time series $X$ and $Y$ which are exactly the same i.e. $X=Y$, the correlation is : $$\rho_{X,Y}= \frac{Cov(X,Y)}{\sigma_X \sigma_Y}\overset{X=Y}{=}\frac{Cov(X,X)}{\sigma_X \sigma_X}=\frac{\sigma_X^2}{\sigma_X^2}=1$$ Now assume a time series $Z=2 \cdot X$, you have: $$\sigma_Z=2 ...


3

Firstly, you'll probably be directed to consider Zipline. It's worth a look but I don't think that it's a good starting point, since: Quantopian's developers don't have a financial background and it shows through in the Zipline source code. Zipline is dreadfully slow if you compare it to any commercial platform with backtesting functionality in a compiled ...


2

possible update: http://pmorissette.github.io/bt/ based on http://pmorissette.github.io/ffn/ both were easily installed and somewhat usable for a novice. would love some examples other that github documentatiion


2

I'd put this down as a comment, but don't have the reputation to do so. There is (or at least used to be) a two part MOOC course over at Coursera by one of the developers of QuantSoftware Toolkit. This is not an endorsement of the course or the software, just a statement of fact (for the record, I did do a part of the course, but found it too simplistic and ...


2

Both R and Python can do this very nicely. For Python you would need the pandas package and its dependencies. pandas has a lot of basic statistics, but for more advanced statistics like it looks like you want to do, you can use the statsmodels package, which can work directly with pandas data types. It can also download the csv files directly off the ...


2

You will need an entry and then a "Grouped" stop loss and take profit (one cancels other). An implementation of this exists in quantstrat in R called ordersets. Documentation and source code can be found here: https://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/R/orders.R?view=markup&root=blotter You will unfortunately need to port this and ...


2

Quandl has a python api: https://www.quandl.com/help/api and free stock fundamentals (some) https://www.quandl.com/help/api-for-stock-data


1

The IB API calls your code asynchronously when there are account updates after you have called reqAccountUpdates. But you have to provide a callback function (handler) for the IB API to call. Looks like from the [ibPy documentation example] (https://code.google.com/p/ibpy/wiki/IbPyOptional) and how the Java IB API is defined, you want to call ...


1

In addition to the above answers - You should be very careful that you do not introduce survivorship bias in your creation of indices and choose your data source carefully to remove such bias. For example, Yahoo Finance only contains currently-listed securities.


1

Go talk to Fincad. Here is their page on integrating with scripting languages: http://www.fincad.com/news-events/assets/pdfs/mar07/using-fincad-developer-scripting-languages.pdf Their analytics libraries include bond analytics, and they have a spreadsheet product so you can test methods and results before implementing them. Disclaimer: I work for a ...


1

As far as I know the Newton method is the preferred method for yield calculation. Two ideas to optimize the loop spring to mind: Run the loop in parallel. Use the last yield as starting value. If you have a good guess the number of iterations necessary per optimization is reduced significantly. How to get the most out of the previously calculated yield ...


1

If you don't know the meaning of the other matrices, I'd look more at the docs and the definition of the quadratic program: http://cvxopt.org/userguide/coneprog.html#quadratic-programming This is also an example from the book: http://www.ee.ucla.edu/~vandenbe/publications/mlbook.pdf And there is a good deal of explanation there. Finally, if you don't ...


1

There is a module called visualize-wealth that provides: Documentation auto-generation capability with sphinx Portfolio construction methodologies in 3 ways (trade blotter, weight allocation frame, and static allocation series) All basic statistical measures, including many sophisticated ones such as CVaR, Mean Absolute Tracking Error, Cornish Fisher ...


1

I have also been searching for algo trading in Python. According to my findings: there are many such librairies available, open-source or proprietary, they are all built quite specifically. as a result, when you know how to use one, it is the only one you are able to use. their stage of development is quite heterogeneous and future uncertain, eg what did ...



Only top voted, non community-wiki answers of a minimum length are eligible