SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Dec 12, 2017 7:37 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Optimzation Results
PostPosted: Sun Aug 13, 2017 12:11 pm 
Offline

Joined: Sun Aug 13, 2017 12:03 pm
Posts: 5
Hi,

I am using OpenQuant 2014.
When i am running optimization for strategy only top 100 results are shown.
Is there a way to show/save all results?

Thanks


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Wed Aug 16, 2017 10:05 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 392
Hello Ziv039,
you can get all results programmatically in scenario:
Code:
Optimize(strategy, universe);   

After optimization the universe will contains the filled property Objective for each OptimizationParameterSet.

Eg,
Code:
         foreach(OptimizationParameterSet parameterSet in universe)
         {
            Console.WriteLine(parameterSet.Objective);
         }


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Sun Aug 20, 2017 11:34 am 
Offline

Joined: Sun Aug 13, 2017 12:03 pm
Posts: 5
Hello,

How can i get all statistics like Net Profit and number of trades from the objective property for each parameterSet?

thanks


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Mon Aug 21, 2017 3:54 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 392
There is new update available,
now you can access statistics results(latest values) from universe:
Code:
         //2. Optimization via OptimizationUniverse
         Optimize(strategy, universe);            
         
         foreach(OptimizationParameterSet parameterSet in universe)
         {
            Console.WriteLine(parameterSet.Objective);
            
            PortfolioStatisticsResult netProfit = parameterSet.OptimizationStatistics[PortfolioStatisticsType.NetProfit];
            
            if (netProfit != null)
               Console.WriteLine("netProfit: {0}", netProfit.TotalValue);
         }


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Tue Aug 22, 2017 11:09 am 
Offline

Joined: Sun Aug 13, 2017 12:03 pm
Posts: 5
Great!! thanks


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Wed Aug 30, 2017 2:33 pm 
Offline

Joined: Sun Aug 13, 2017 12:03 pm
Posts: 5
Where can I get the newer version ?
I have downloaded from the website and this is the same version that i have (num. 1.0.6442.28233)

Is there a way to update the platform without downloading new platform ?

Thanks


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Thu Aug 31, 2017 10:53 am 
Offline

Joined: Sun Aug 13, 2017 12:03 pm
Posts: 5
In addition i am trying to access the results of the genetic multi-core optimization after running but all the results return zero.

This is my partial code:

GeneticMulticoreOptimizer gentic = new GeneticMulticoreOptimizer(Framework.Current);
OptimizationUniverse universe = new OptimizationUniverse ();
/*
configure universe with its relevant parameters
*/
gentic.Optimize(strategy, universe);

Finally i try to get the results by:
foreach (OptimizationParameterSet parameterSet in gentic.OptimizationUniverse)

Unfortunately all parameterSet's objective return zero.

Am i doing something wrong?
Thanks


Top
 Profile  
 
 Post subject: Re: Optimzation Results
PostPosted: Fri Sep 01, 2017 12:52 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 392
update:
now all optimizers will return optimization statistics.
You can use predefined universe or use auto-generated universe from optimizer
Code:
         //2. Optimization via OptimizationUniverse
         Optimize(strategy, universe);            
         
         int counter = 0;
         
         foreach(OptimizationParameterSet parameterSet in universe) //OptimizationManager.Optimizer.OptimizationUniverse
         {
            if (parameterSet.OptimizationStatistics != null)
            {
               counter++;
               
               Console.WriteLine("Objective: {0}, {1}", parameterSet.Objective, parameterSet.ToString());
            
               PortfolioStatisticsResult netProfit = parameterSet.OptimizationStatistics[PortfolioStatisticsType.NetProfit];
            
               if (netProfit != null)
                  Console.WriteLine("netProfit: {0}", netProfit.TotalValue);
            }
         }
         
         Console.WriteLine("Optimization done, results with Statistics: {0}", counter);


update will be available in next release.


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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