There is no Cloud Parallel Computing for Home Users ?

조회 수: 1 (최근 30일)
Flavio
Flavio 2018년 10월 18일
댓글: Stephan 2018년 10월 19일
I have a copula fitting computing problem with 21 stocks, which with 4 cores an 8 hours running it cannot compute. Therefore I tried to look for a solution in the cloud, however I found out that Home Users cannot have access to then....therefore no solution to my problem, is that correct ?
  댓글 수: 5
Flavio
Flavio 2018년 10월 18일
Only that last line that needed to use parallel computing, the test of the code is computed in a good manner.
I changed the method of the copulafit function to ‘ApproximateML’ and it ran fine now.
Stephan
Stephan 2018년 10월 18일
Glad to hear. Please accept helpful answers in order to help people with similar Problems find helpful answers.

댓글을 달려면 로그인하십시오.

채택된 답변

Stephan
Stephan 2018년 10월 18일
편집: Stephan 2018년 10월 18일
Hi,
your code is not written in a way that it performs the calculations in parallel - have a look at statset. This is the way you tell the copulafit function to do parallel and other options. First find out the standard options for copulafit:
>> oldopts = statset('copulafit')
oldopts =
struct with fields:
Display: 'off'
MaxFunEvals: 200
MaxIter: 100
TolBnd: 1.0000e-06
TolFun: []
TolTypeFun: []
TolX: 1.0000e-06
TolTypeX: []
GradObj: []
Jacobian: []
DerivStep: []
FunValCheck: []
Robust: []
RobustWgtFun: []
WgtFun: []
Tune: []
UseParallel: []
UseSubstreams: []
Streams: {}
OutputFcn: []
Parallel is not active by standard. To set parallel, start a parallel pool first by parpool command:
>> parpool
Starting parallel pool (parpool) using the 'local' profile ...
connected to 4 workers.
Then use:
>> options = statset(oldopts,'UseParallel',true)
options =
struct with fields:
Display: 'off'
MaxFunEvals: 200
MaxIter: 100
TolBnd: 1.0000e-06
TolFun: []
TolTypeFun: []
TolX: 1.0000e-06
TolTypeX: []
GradObj: []
Jacobian: []
DerivStep: []
FunValCheck: []
Robust: []
RobustWgtFun: []
WgtFun: []
Tune: []
UseParallel: 1
UseSubstreams: []
Streams: {}
OutputFcn: []
Of course you can do the same in your script and supress outputs with ';' - but for showing hot the difference is, it is better this way i guess.
Then change the call of copulafit so that it uses those options above:
[rho, nu] = copulafit('t', U, options);
Now the calculation should run in parallel mode.
If this is still to slow consider:
[rho,nu] = copulafit('t',[u v],'Method','ApproximateML', options);
This method can be faster but less accuracy on small or middle data - resd this link of the documentation to learn more:
Best regards
Stephan
  댓글 수: 3
Flavio
Flavio 2018년 10월 18일
Stephan, just a correction in the last line:
[rho, nu] = copulafit('t', U, 'Options',options);
The code activate Parallel Computing mode, however, not to run this function. A technical lady from Matlab told me PC does not run in the copulafit function...
I have another question posted regarding how to setup 'Conditional' lower bounds in the PortfolioCVaR object in the same way we have for the Portfolio object. Ex: lower bound could be 0 or 0.02. Do you have this answer ? Thanks a lot!
Stephan
Stephan 2018년 10월 19일
I tried to answer here.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by