| bio | website | zoonek.free.fr |
|---|---|---|
| location | London | |
| age | ||
| visits | member for | 1 year, 4 months |
| seen | 18 hours ago | |
| stats | profile views | 73 |
After studying algebraic geometry, algebraic topology and category theory, after teaching mathematics and computer science in university and high school, after studying bioinformatics and implementing image analysis algorithms in a biotech start-up, I have since been working in finance, in London and Tōkyō.
My preferred programming languages are R and Perl, but I try to use the best language and tools to solve the problem at hand. I also like to learn more marginal languages, such as Haskell or Oz/Mozart. I am interested in human languages, too.
Here is a selection of my answers.
Computing a probability density function from its characteristic function or by maximizing its entropy;
Quadratic programming to ensure a sequence is increasing or to position labels on a plot
Reparametrizing optimization problems to make them unconstrained, for instance to fit stable distribution; penalizing them to restrict them to a discrete search space
Speeding up computations in R using C or by expanding some of the computations
|
Apr 16 |
comment |
PCA Variances and Principal Portfolio Variances If I run your code, I have identical values. Try in a fresh session ( rm(list=ls()) is usually not sufficient). |
|
Jul 8 |
comment |
Methods for distributing cash into allocation This is called dollar cost averaging, but it just says that if you do not have all the money at the begining and if you do not have any view on the evolution of the market, you should not worry and invest progressively, as the money arrives: the market fluctuations will more or less even out. But if you have all the money at the begining and/or know how the market will change, this is suboptimal. |
|
Jun 21 |
comment |
Quadratic Programming Problem I assume that $V$ and $G$ are variance matrices (of returns, etc.): in particular, they are positive semi-definite. If there are no constraints, then $X=0$ is a solution. If you have equality constraints, you can use Lagrange multipliers. If you also have inequality constraints, you can use a quadratic solver. I am not sure what you mean by "both V and G should be uncorrelated" (diagonal variance matrices?). |
|
Jun 7 |
comment |
How to quickly estimate a lower bound on correlation for a large number of stocks? An upper bound, in the general case, can be obtained in the same way -- compute the determinant of the $3\times3$ matrix and solve for $c$: one of the roots is a lower bound, the other an upper bound. The formula is the same, except for the sign in front of the square root. |
|
May 28 |
comment |
Historical volatility from close prices (Haug pg 166) You seem to have logarithms of squared ratio returns ( log_squared_returns) instead of squares of log-returns: sum_squares_1 can be negative. |
|
May 10 |
comment |
GJR-GARCH Model In Rlibrary(sos); ???GJR suggests that the rugarch package can fit this model. |
|
May 5 |
comment |
MPT: Adding constraint on minimum asset weight @BobJansen: I have made the change you suggested, to match the constraints in the question. |
|
May 5 |
comment |
MPT: Adding constraint on minimum asset weight The constraints ``$w_i = 0$ or $0.01 \leq w_i \leq 0.05$'' can be rewritten as $0.01 n_i \leq w_i \leq 0.05 n_i$ by adding binary variables $n_i \in \{0,1\}$. The constraints are still linear, but the objective function is still quadratic: we would need a mixed integer quadratic solver -- Rglpk is only a (mixed integer) linear solver... |
|
May 4 |
comment |
MPT: Adding constraint on minimum asset weight That only considers the constraint $0 \leq w_i \leq 0.05$, not the non-convex constraint ``$w_i=0$ or $0.01 \leq w_i \leq 0.05$''. |
|
Mar 31 |
comment |
If the distribution of returns in symmetric, why not use a coin toss, small risk & high reward? Your strategy seems equivalent to the following: the price $X_t$ is a standard random walk, you buy at $t=0$ and sell when it reaches -1/2 or 2 (whichever comes first). In this case, the expected profit is zero. |
|
Mar 22 |
comment |
a simpler test for normality given skewness, kurtosis and autocorrelation and size of time series To visually compare distributions, it is often easier (for the untrained eye) to look at the quantile-quantile plots: the sample data versus a gaussian distribution to test for normality, the first half of the sample versus the second half to test if the distributions are identical. |
|
Feb 6 |
comment |
Calculating log returns using R To be sure that lag works as you expect, it is much safer to store your time series as zoo or xts objects: if you use vectors (or even ts objects), many operations will discard or ignore the timestamps. |