Portfolio Simulator – estimate the expected risk and return of your investments

Our simulator allows you to simulate 100 future scenarios of your portfolios, estimate the expected risk, return and correlations, helping you to improve the diversification of your portfolios. The simulator projects the historical returns in future and is completely model-free (in particular, we don't make an unrealistic assumption of Normally-distributed returns). Though the past doesn't capture all possible future scenarios, it provides a good idea of possible outcomes.
Continue reading "Portfolio Simulator – estimate the expected risk and return of your investments"

Calling an R-script from PHP: pitfall with loading R-packages

We continue developing letYourMoneyGrow.com and soon will make the first tool from the promised portfolio optimization toolset publicly available. And so far a small technical report. We implement the core business logic in R and wrap-up it with PHP. Calling Rscript from PHP via exec("Rscript ...")  seems to be easy ... as far as you don't use any libraries. And if you do, you will get an error message like Error in library(RMySQL) : there is no package called 'RMySQL'. Fortunately, there is a solution. However, note that a loaded package may depend on other packages. For instance, RMySQL depends on DBI. Thus you should explicitly resolve this dependency in your R-code like this:

library(DBI, lib.loc = c("/home/<yourUsername>/R/x86_64-pc-linux-gnu-library/<yourRVersion>", "/usr/local/lib/R/site-library", "/usr/lib/R/library"))
library(RMySQL, lib.loc = c("/home/<yourUsername>/R/x86_64-pc-linux-gnu-library/<yourRVersion>", "/usr/local/lib/R/site-library", "/usr/lib/R/library"))

The power of diversification and its limits by the example of DAX

Summary

  • Sometimes (esp. to fool inexperienced retail investors) the diversification is claimed to be a silver bullet (even in a financial crisis).  I show that in crises the diversification effect weakens significantly but still persists (esp. for "defensive" stocks).
  • I argue that in a normal (non-turbulent) market the diversification is very helpful in theory but also critically consider its applicability in practice.
  • The results that we obtained for the DAX / German stock market should be extrapolated with caution for other markets. You will also see why it is better to watch and know the market (rather than to blindly rely on quantitative analysis and common sense).

Continue reading "The power of diversification and its limits by the example of DAX"

Mystery and misery of the martingale betting system: why it will not make you rich

Summary:

  • The martingale strategy asymptotically implies infinite capital or infinitely divisible stake. In reality you have a limited capital and there is a lower (in casino also an upper) bound of the stake.
  • In a fair game (with 50/50 chance of profit and loss) the probability of profit after a series of losses is still 50% (because the outcomes of bets or trades are independent from each other).
  • Typically, if you win then your profits are moderate but if you lose, the losses are severe (you can lose your capital just after a small series of unlucky bets).
  • If you make pretty many bets, you might make a good profit but the probability to make profit at all decreases with the number of bets. Losses stays severe.

Continue reading "Mystery and misery of the martingale betting system: why it will not make you rich"

Binary Options: you may earn in a short term but eventually you WILL lose

Summary: 

  • Gambling with binary options you either lose 100% or earn about 90% of your stake. The win lose/ratio of 90/100 = 0.9 is worse than by the European roulette (36/37 = 0.973) and even by American roulette (36/38 = 0.947).
  • A trade takes just a couple of minutes, which allows (and implicitly encourages) you to commit a lot of trades. Due to the law of large numbers and negative odds, the more you trade, the more you lose.
  • Don't trust numerous "success stories" in Internet. Virtually all of them are fake and they are just a marketing trick of brokers or those who earn with brokers' affiliate programs.

Continue reading "Binary Options: you may earn in a short term but eventually you WILL lose"