SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sun Sep 24, 2017 5:58 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Sep 14, 2017 10:24 am 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 200
How do you change the objective function to maximise the sharpe ratio instead of PnL in any optimizer?


Top
 Profile  
 
PostPosted: Fri Sep 15, 2017 1:46 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 367
Hello azuric,
it will be look like this, code for strategy:
Code:
      public override double Objective()
      {
         var item = Portfolio.Statistics.Get(PortfolioStatisticsType.SharpeRatio);
         
         double result = 0;
         
         if (item != null)
            result = item.TotalValue;
         
         return result;
      }   


Attachment:
objective.png
objective.png [ 11.91 KiB | Viewed 33 times ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group