English version R-Portfolio
OS Windows XP/Vista/Seven
License: Creative Commons (cc by-nd)
Compatible with MS Excel
Archive with the installer and uninstaller in the attached file:
Files:
rpsetupeng.zip
74 kb
Really thanks for your contributions.
I try to learn a lot about you in the russian forum.
A great pleasure.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
As input files, quotations for the formation of R-portfolio format is CSV c delimited fields in the form of a semicolon and comma of digits in a decimal or as a point or a comma: In the first line of the file should be placed the names of financial instruments. The first column in the file must be placed the date and time quotes (for the opening prices of trading sessions) - the format of any. Time must be sorted in descending order of precedence: the most outdated quotation should be placed in the rows above in relation to the most recent. In the first row and first column can be placed any information. At the intersection of the names of financial instruments and time should be placed in quotes as numerical values of prices opening bars of the timeframes. If price changes in a specified time there was no need to specify the price, made for a previous time, from the upper rows of the corresponding columns
Algorithm R-Portfolio converts quotes to the table yields the formula:
next_profitability = (next_price - previous_price) / previous_price
This table profitabilities a payoff matrix according to the mathematical theory of noncooperative games for antagonistic two-person game (meaning a trader - a player in the columns and the market - the player along the lines of) a zero-sum. Decision of the payoff matrix for player of the columns is optimally diversified portfolio.
If the number of rows of the payoff matrix exceeds the number of columns, the oldest rows are removed so that the number of rows and columns was equal to. To solve the payoff matrix used a fast algorithm for the Brown-Robinson, which has a high convergence and a small error.
To avoid fitting to historical data, it is necessary to form portfolios on the basis of quotations of several hundred liquid financial instruments, and several hundred periods. A small number of financial instruments and time periods, as well as illiquid financial instruments may contain random correlation due to the high errors in quotations are not confirmed in the future.
Expert Advisor, which automatically collects quotes and creates a file in CSV format for the program R-Portfolio.
Code EA is given as an example. Symbols are used CFD for shares in the index DJI-30 with tickers: AA, AXP, BA, BAC, CAT, CSCO, CVX, DD, DIS, GE, HD, HPQ, IBM, INTC, JNJ, JPM, KFT, KO, MCD, MMM, MRK, MSFT, PFE, PG, T, TRV, UTX, VZ, WMT, XOM.
You must open all of the above charts with tickers timeframe D1, wait for the update (internet connection should be connected) and one of the charts set adviser. Expert Advisor to create a file of quotations r-portfolio-dji.csv in folder path_to_terminal/experts/files
This is the file you want to open a program R-Portfolio
Expert Adviser in the attached file: