New answers tagged

0

AlphaVantage returns all the DAX (and FTSE, CAC, MIB etc.) components fine, you just have to add the appropriate suffix i.e. BMW.FRK (BMW) and AIR.PAR (Airbus). Best way to use it is to install the free Excel/Google Sheets add-on and then use the =AVSearchEquitySymbol(search string) function. I do all my AlphaVantage testing on Google Sheets, before ...


1

You're not going "wrong" anywhere. When you say the regression runs poorly it is a sign that the returns for your portfolio are not that well explained by the fama french factors (which is a positive thing for your risk factors, idk why you call it poor). When you long-short the two stocks you create a portfolio that has lesser risk that the individual ...


5

Why choose? C++ is perfectly integrated into R via the excellent Rcpp package (on CRAN). And you can use complex numbers there too: library(Rcpp) cppFunction("ComplexVector doubleMe(ComplexVector x) { return x+x; }") doubleMe(1+1i) ## [1] 2+2i doubleMe(c(1+1i, 2+2i)) ## [1] 2+2i 4+4i I would suggest starting out with R and if you run into performance ...


2

@Dhruv Mahajan makes a good point in my opinion. @LuigiBallabio in the comments is speaking from a position of authority here as he is the lead developer of QuantLib. If you want to learn C++ and Pricing at the same time you can try C++ Design Patterns and Derivatives Pricing (Mathematics, Finance and Risk) by Mark Joshi. However, since that books has been ...


5

I think it's best to learn generic C++. Most of the firms hiring for quant Dev roles usually need good general programming skills and interest in the markets. If you're learning for personal trading I'd say learn Python and for that any Data Science course that includes coding algorithms from the scratch (not through libraries) would suffice.


2

You need to remove the call to range. In Python it’s necessary but here it just returns the smallest and largest element of the vector.


2

Are you sure your rf values are right? If 15 is to mean 15%, then write it as 0.15.


3

As you've found, the Bond class assumes that you're buying a bond; that is, you're paying a notional upfront and it will be returned to you in one solution or in a series of amortizing payments. The assumption is coded here, and you might try removing it and recompiling but I don't suggest it. It might be that other parts of the code rely on that check ...


1

Your function returning (minus) the log-likelihood seems weird to me, I would go with function y = findGARCH_LLy(params,S,rf) % Finds log-likelihood for the GARCH option pricing model. alpha0 = params(1); alpha1 = params(2); beta1 = params(3); lambda = params(4); N = length(S); % Define the returns (pad first return with zero) r = [0, diff(log(S))]; % ...


Top 50 recent answers are included