Any good structure for a simple self-made backtesting platform?

Discussion in 'App Development' started by j2ee, May 11, 2013.

  1. Gizzz

    Gizzz

    You will be trying to generate a signal to buy or sell, based on what has happened in a time-span.

    Starting at some point in the past and ending when the calculation takes place.
     
    #11     May 11, 2013
  2. j2ee

    j2ee

    I try tradelink and it just doesn't even work. Tried to import data from google and yahoo, only give me like limited to 5 years daily data and there is no way to fix it except go into the source code.

    The way tradelink stores data is very hard to understand why they choose to do so. They store high, low, open, close in four rows in a table and don't even mark down which is which.

    Ninja, MultiChart is very limited kind of script language, I choose to use real C#. For retail trading system like these, I don't even know if their backtest result is precised.

    Yeah trading algo is the most important, so I need to build my own to implement not just simple kind of algo. Retail trading system can just implement simple kind of algo. May be there are ways to imple some (just some) complated algo with retail trading system, but it is harder to find out how and learn it than building my own trading system, and the experience to learn C# of Ninja, multichart, or easy language mean nothing in real financial IT industry.
     
    #12     May 11, 2013
  3. j2ee

    j2ee

    If I put my temporary calculations in linked list, data that I want to store and historical data in SQL database 2008, does this structure makes sense to you? My backtest is not super heavy so I don't think I need to go down to binary file.

    Is it hard to build live part with IB?

     
    #13     May 11, 2013
  4. vicirek

    vicirek

    I would recommend that you look at .net collections like lists, queues, and sortedlists/dictionaries and see if linked list is the right choice to work with your data.

    If you want to use sql then there are few technologies built in .net that let you deal with sql queries and working with data like linq and ado.net. That would probably make more sense and would let you use sql in very structured way with familiar c# syntax.

    I would say it s challenging to become familiar with ib api because it is meant for more experienced programmers. It is not hard to start bulding simple system but making it good for production is another matter.

    IB does not have example of c# application and you have to use activex from ib or third party library like ibcsharp to link to ib tws.
     
    #14     May 11, 2013
  5. j2ee

    j2ee

    i dont kmow why ib has vb example vut not c#
     
    #15     May 12, 2013
  6. vicirek

    vicirek

    vb and c# are very similar and behind the scenes almost identical and you can use activex ib manual to implement it in c# (converting it to c# syntax)
     
    #16     May 12, 2013
  7. j2ee

    j2ee

    That is what I thought:D
     
    #17     May 12, 2013
  8. flakac

    flakac

    I decided to use Matlab for backtesting&trading system development. Yes, the Java (or any real programming language is better) but I had no experience to work in anything else then Matlab.
    My system consist of several objects, they are connected to each other trough event -listener mechanism (=nightmare for debugging and source of instability) The first objects reads the data and the last objects creates the trading signals. (the objects between do data processing, machine learning, etc)
    The connection to broker I haven't done yet..
    Matlab pros:
    - You can do what you want, the programming is easy and quick
    - Plenty of ready made methods you can use (like machine learning methods in statistic toolbox) You do not need program this yourselv.
    Matlab cons:
    - Mechanisms common in other programming languages are missing
    - Matlab calculation are vector based, which is good for simple ccalculations but if you want incremental steps (data arrive - data are processed) then you must handle it accordingly.
    - No multithreading (or at least it is difficult)
    - Big memery demands
    - Very slow
    And even the programming in Matlab is easier then in other languages (at least for me..) the time demand to develop something useful is huge huge....
    If you want you need OWN back testing platform, think carefully why not to use something what is available already. Because development something from scratch is really not easy. If I know it beforehand, I never do it again ...
    So if you really need your own backtesting, do the flowing:
    - Hire a project manager
    - Hire some programmers
     
    #18     May 12, 2013
  9. dom993

    dom993

    You are totally wrong & stubborn. Ninja (and likely Multichart) offers the full spectrum of C# to develop your indicators & strategies.

    I have developed in Ninja/C# systems which complexity is far beyond what you'll ever do. Ninja's framework isn't hard to understand at all, and again, by using it you would learn a lot about what a trading platform must offer, and that would give you a basis to compare architecture options.
     
    #19     May 12, 2013
  10. j2ee

    j2ee

    How do you live trade with matlab? I don't think it is even supported.
     
    #20     May 12, 2013