# Articles by Orval

### logopt: a journey in R, Python, finance and open source 2017-05-02 21:35:00

May 2, 2017 |

A R named list is not a python dictionary¶In the previous post, mpiktas posted a comment that included this question "Isn't Python dictionary a named list in R?". The short answer is no, but the reason why is worth some more explanation. At first sight, a named list does ... [Read more...]

### Python and R for code development

March 5, 2017 |

The previous post glossed about why I now prefer Python to write code, including for a module like logopt. This post explains in more details some specific differences where I prefer one of these two languages:0-based indexing in python versus 1-based indexing in R.  This may seem a small ... [Read more...]

### Escaping the simplex, part 1

November 22, 2012 |

Before tackling the main subject, two quick notes:I did not post for quite a while in part because I followed the Coursera online course Introduction to Computational Finance and Financial Econometrics.  It was a nice refresher, extremely well pre... [Read more...]

### Universal portfolio, part 11

September 23, 2012 |

First an apology, the links to the Universal Portfolio paper have stopped working.  This is because the personal webpage of Thomas Cover at Stanford has been taken down, but fortunately the content moved elsewhere.  The new link is Universal ... [Read more...]

### Universal portfolio, part 10

August 10, 2012 |

Part 9 compared the wealth of Universal against other portfolio selection algorithms by using the experimental cumulative distribution function of the relative wealth.  This leads to a very compact representation, but it completely hides the ... [Read more...]

### Universal portfolio, part 9

July 25, 2012 |

Part 8 was discussing the distribution of the absolute wealth of the Universal Portfolio across all possible tuples of length 2, 3 and 4.However, comparing the absolute wealth against some reference, especially against simple portfolio selection algor... [Read more...]

### Universal portfolio, part 8

July 18, 2012 |

We extend the analysis of part 7 by calculating the final wealth for all tuples of 3 and 4 stocks, this is a simple extension but it also shows the most important problem of the Universal portfolio algorithm, its exponential complexity in the number of... [Read more...]

### Universal portfolio, part 7

July 7, 2012 |

After reproducing all original figures and tables from Universal Portfolios, R coupled with modern processors allows to perform some more analysis.First we calculate the final wealth of the universal portfolio for all possible pairs of stocks, and... [Read more...]

### R is fun

June 30, 2012 |

As mentioned in Universal portfolio, part 6, the wealth reported in Table 8.4 of Universal Portfolios could not be reproduced.  An other observation is that the random weight vectors reported in Table 8.4 are shown in descending lex... [Read more...]

### Universal portfolio, part 6

June 10, 2012 |

The final table in Universal Portfolios introduces leverage.  It indirectly also shows the dangers of rebalancing on margin, while Kin Ark increases 4.2 times, at 50% margin it goes to nothing.The code below reproduces Table 8.4, again a... [Read more...]

### Universal portfolio, part 5

June 9, 2012 |

The first three tables in Universal Portfolios presents the same information in numerical form as some of the plots.  The following code generates all three tables by defining a function then calling it with suitable parameters.  Th... [Read more...]

### Universal portfolio, part 4

June 7, 2012 |

The graph for figure 8.4 requires to be somehow careful about correctly lagging the CRP value when calculating the weights.# fig 8.4 of Cover "Universal Portfolios"require(logopt)x [Read more...]

### Universal portfolio, part 3

June 3, 2012 |

After the theoretical analysis, section 8 of Universal Portfolios provides examples.  We now use logopt and R to reproduce them, the first three in this post.The examples of Universal Portfolios use a long time series... [Read more...]