Question: write a R code for Portfolio Optimisation using genetic algorithm using R language using Rmarkdown format: Part 1 The focus of the first part of
write a R code for Portfolio Optimisation using genetic algorithm using R language using Rmarkdown format: Part
The focus of the first part of the assignment is on the optimisation of the portfolio using a GA To begin with, manually choose a set of assets to work with which ones you select are entirely up to you, but aim to work with around and also try to pick ones which don't all exhibit the same behaviour eg maybe take them from different sectors
Then use a genetic algorithm and the GA package to identify the optimal set of weights for your portfolio which gives the best balance of risk versus return.
Having done this you then need to conduct a detailed evaluation of the portfolio by looking at how well it might perform in the "future", and comparing it with other possible portfolios particularly a balanced portfolio, where all weights are even, and a set of randomly generated portfolios
Finally for this part try exploring different weightings of risk and return. The idea behind this it to try and emulate a multiobjective approach and you will need to think about how it is possible to modify the fitness function to create differently balanced portfolios eg at the extremes might be ones which only care about maximising returns or are very risk averse, and in between might be ones which prioritise risk over return and viceversa. How do the weights and the performance of these portfolios compare with each other and your other solutions? I want to use these stocks symbols cKFHKWNBKKW "AGLTY.KW "ZAIN.KW "BOUBYAN.KW
"WARBABANK.KW "OOREDOO.KWSTCKW "NAPESCO.KW "ABAR.KW getSymbolssymbols src "yahoo" from to
ReturnData data.framemergedailyReturnKFHKW
dailyReturnNBKKW dailyReturnAGLTYKW dailyReturnZAINKW
dailyReturnBOUBYANKWdailyReturnWARBABANKKW
dailyReturnOOREDOOKW dailyReturnSTCKW dailyReturnNAPESCOKW
dailyReturnABARKW meanofReturns applyReturnDatamean covOfReturn covReturnData I did only this for part one and I don't know what fitness function to use and how to do the rest of part one and two. Part
Once you have done this successfully, then try extending your solution to select the set of assets for your GA to work on The pool from which you select should be reasonably large minimum of and to begin with you may identify the selection criteria so that this GA operates independently of the one in part but would pass on the set of identified assets to be weighted by the GA from part Once you have this working and if you are feeling ambitious! then investigate how these might work together working out an efficient evaluation mechanism is the key to this part
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
