Tag Info

New answers tagged


I have every reason to believe this is a homework so I won't code it for you. In fact, your question is not totally clear, you haven't told us what are the rows and what are the columns. We know it's a 20x20 matrix, but what it's that supposed to be? A common implementation is illustrated below: So you can have a diagonal matrix where the columns are the ...


Native support is very limited. TradeStation's WebAPI pretty much works with any language because it is wrapped in HTTP calls using RESTful. If a platform has an API that supports std C/C++ interfaces, you can write a wrapper to extend the API to python. Search for "Calling C from Python". It is more work to code, but otherwise your choices are very ...


Touch option is simply a barrier option in QuantLib. You could create one like a down-in barrier type. You can also set the payoff to a binary payoff. The payoff is represented by the StrikePayOff class. A comprehensible example is available on github here.


Just came up with the thought that if I supply my expected return vector instead of entire return series matrix to portfolio.optim, and also provide my own covariance matrix using argument covmat=.., then this might work.


You can use the package quadprog and define everything yourself. Code can look like this: library(quadprog) Sigma = cov(data) mu = mean(data) Amat_in # define constraints here bvec_in # define rhs of constraints here solve.QP( Dmat = 2*Sigma, dvec = mu, meq=0,Amat=Amat_in,bvec=bvec_in) EDIT: Yes, and reading the documentation we see that ...

Top 50 recent answers are included