VBA for backtesting

Anyone here use VBA via Excel to test trading strategies/backtest/calculate probabilities etc

Just wondering before I dive head first into it! xxoxoxoxooxxooxoxxo
 
Have you considered hiring a freelancer to do the coding?
If you know some programming, you can even design the codes
and farm each part to different programmers.
 
Could you enlighten me as to why someone would choose to use VBA code when there are so many free backtesting programs around, like Ninjatrader for example? AM I missing something?
 
Quote from fx0011:

Could you enlighten me as to why someone would choose to use VBA code when there are so many free backtesting programs around, like Ninjatrader for example? AM I missing something?

you missing a lot.i'm not familiar with NT,but i'm pretty sure that there is plenty of conditions not covered in NT. in VBA you can work with classic database (such as MS access) for example or using variety of files. can you do portfolio testing in NT? can you filter trades that are above current ask or below bid (plenty trades like this on stocks)?
can you scrap data from websites in NT? and many many more
bottom line-FLEXIBILITY(VBA might be a bit limited,but VB (for example) will give you a COMPLETE flexibility. you can do whatever with it.
 
Quote from Bob111:

you missing a lot.i'm not familiar with NT,but i'm pretty sure that there is plenty of conditions not covered in NT. in VBA you can work with classic database (such as MS access) for example or using variety of files. can you do portfolio testing in NT? can you filter trades that are above current ask or below bid (plenty trades like this on stocks)?
can you scrap data from websites in NT? and many many more
bottom line-FLEXIBILITY(VBA might be a bit limited,but VB (for example) will give you a COMPLETE flexibility. you can do whatever with it.

+111
Great points.
 
Quote from Huskeez:

Anyone here use VBA via Excel to test trading strategies/backtest/calculate probabilities etc

Just wondering before I dive head first into it! xxoxoxoxooxxooxoxxo
Not VBA via Excel but plain Visual Basic, yes.

But what is the question?
 
Quote from Bob111:

you missing a lot.i'm not familiar with NT,but i'm pretty sure that there is plenty of conditions not covered in NT. in VBA you can work with classic database (such as MS access) for example or using variety of files. can you do portfolio testing in NT? can you filter trades that are above current ask or below bid (plenty trades like this on stocks)?
can you scrap data from websites in NT? and many many more
bottom line-FLEXIBILITY(VBA might be a bit limited,but VB (for example) will give you a COMPLETE flexibility. you can do whatever with it.

I am migrating all my automated system to the XL arena for the sake of this word, flexibility.

Tough project but decision made.

Hopefully, on New Year, i would have something to play with.
 
Developing a backtester in Excel is too slow , I wrote one 15 years ago and even did a 9 part series on Excel in Futures magazine. About 12 years ago I release a trading platform which you programmed in VBA for Excel, but it was too slow.

If your doing toy strategies and what to play you can use Excel. Speed is a issue, If you want flexibility and a rich environment you need to code a lot of things in C++ and support multi-threads. Even .NET is hard because if you don't know how to code it is very slow, for example Variant's used in VB 6.0 need to be object in VB.NET which makes them run even 5-10 times slower than even the old VB 6.0 code. You need to use strong typing.
 
slow is 'relative'. it might be slow if one doing back testing on 5-10 years of tick data on old PC for whole stock market :)
but it doen't mean that it would be slow to use in backtesting let say on EOD data,stored in binary format on decent machine like average i5 with SSD
not to mention the obvious fact that VBA is much more 'user friendly' than .net or c++ :)
 
Back
Top