SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Fri Oct 11, 2024 8:51 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jun 16, 2014 6:15 pm 
Offline

Joined: Fri Apr 25, 2014 10:56 am
Posts: 9
Hi,

I'm working with a strategy where the set of indicators & parameters is constantly changing.
Therefor I need to construct new Instances of the Indicator class on every bar (onBar).

A strategy coded in this way does run, but it is very slow and in backtesting after some hunderd bars I run into this OutOfMemory error.
I've verified that the calling the Indicator class construction at every bar is indeed the problem. If I construct the Indicators at OnStrategyStart, so with parameters kept constant during the simulation, there is no problem.

What approach would you suggest for my situation ?

Regards,

Frank

Quote:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Generic.SortedList`2.set_Capacity(Int32 value)
at System.Collections.Generic.SortedList`2.EnsureCapacity(Int32 min)
at System.Collections.Generic.SortedList`2.Insert(Int32 index, TKey key, TValue value)
at System.Collections.Generic.SortedList`2.set_Item(TKey key, TValue value)
at SmartQuant.Data.MemorySeries`1.Add(DateTime datetime, Object obj)
at SmartQuant.Indicators.Indicator.Add(DateTime DateTime, Double Data)
at SmartQuant.Indicators.EMA.Calculate(Int32 index)
at SmartQuant.Indicators.EMA.OnInputItemAdded(Object sender, DateTimeEventArgs EventArgs)
at SmartQuant.Indicators.Indicator.OnInputItemAdded2(Object sender, DateTimeEventArgs EventArgs)
at SmartQuant.Series.ItemAddedEventHandler.Invoke(Object sender, DateTimeEventArgs e)
at SmartQuant.Series.TimeSeries.EmitItemAdded(DateTime dateTime)
at SmartQuant.Series.BarSeries.Add(Bar bar)
at SmartQuant.Instruments.BarSeriesList.l9GsJ1Y3L(Instrument , Bar )
at SmartQuant.Instruments.DataManager.FXeMVYXvd(Object , BarEventArgs )
at SmartQuant.Providers.ProviderManager.donsPjTgF5(Object , BarEventArgs )
at SmartQuant.Providers.BarEventHandler.Invoke(Object sender, BarEventArgs args)
at SmartQuant.Simulation.SimulationDataProvider.oB8NQOfhqM(IFIXInstrument , Bar )
at SmartQuant.Simulation.SimulationDataProvider.QGYNAiGibJ(SeriesObjectEventArgs )
at SmartQuant.Simulation.SeriesObjectEventHandler.Invoke(SeriesObjectEventArgs args)
at SmartQuant.Simulation.Simulator.dEG48R9xls(IDataSeries , IDataObject )
at SmartQuant.Simulation.Simulator.Asx4Vq8104()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


Top
 Profile  
 
PostPosted: Mon Jun 16, 2014 6:36 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

are we talking about OpenQuant 2013, 2014 or VisualQuant (you posted this message into VisualQuant forum...)

Regards,
Anton


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 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