Does SVM work? Pointers to SVM trading systems examples?

Discussion in 'Strategy Building' started by mizhael, Apr 5, 2010.

  1. Hi all,

    Could anybody please kindly point me to (toy example) of SVM trading systems, which at least show some PnL curves?

    I have been reading papers and articles but none of them really show any curves nor do they share sample codes...

    Thanks a lot!
     
  2. Anyone bright enough to understand SVMs is bright enough to download some Yahoo data and write a few lines of R code.
     
  3. gtor514

    gtor514

    My friend, what do you need someone else trading system for? Go here and...

    http://www.csie.ntu.edu.tw/~cjlin/libsvm/

    and download the compiled executables and you'll have everything you'll need to scale, train, and predict for your own trading system. You will then be able to conclude for yourself whether they work or not.

    I'll save you some trouble. Attached is a zip containing the exes, some actual training and testing data. Just download and extract anywhere on your computer. Double click on the test.bat file to both train the SVM on the training data and then test the model on the testing data. You can open up the test.bat file in a text editor to see the training options. This one was set to for classifying.

    The data is derived from real trading data.

    Hope this helps.
     
  4. The problem with this kind of prediction is that they optimize with respect the correct rate, say the correct rate of up/down.

    However that's severely insufficient, because in fact you need to be as correct as possible on the magnitude of up/down, instead of just the directions.
     
  5. Go to a buddy of mines blog www.maxdama.com . I'm pretty sure he has some good examples of SVM and decision tree systems there, in the software and examples section. Although, he was telling me, that last summer he was working at a hedge fund, that was strictly SVM based where there were alot of people far smarter than he... And they couldn't do it. You're probably better off looking into model averaging. I don't believe you can predict markets anyhow...Only control things as they're happening instead...

    Smoke
     
  6. gtor514

    gtor514

    Then you use a regression type SVM with the appropriate kernel if you want to solve for a magnitude. The LibSVM will do both regression and classification.
     
  7. RedRat

    RedRat

    I used SVM, libsvm in C++ project to predict the market. Unfortunately I did not succeed.
    Before SVM I used NeuralNetworks for the same reason. What I found that SVM is slow in learning (you optimize couple of parameters G and C). The prediction is also very slow, in comparison with NN. And the quality of prediction was NOT better then the quality of NN. Strange enough? But it was my result.

    I also tried to "diversify" signals, to calculate Signal = (Signal_NN + Signal_SVM) / 2
    but it did not give me an improvement

    If I remember numbers,
    Correlation(NN_prediction, SVM_prediction) was around 0.96

    Correlation(NN_prediction, Needed_result) around 0.7 (depending on what do you predict)

    So models predict, but it was NOT enough to make money

    The major problem in my opinion is what to use as inputs to the SVM, and what to predict with it. You may use NN/SVM/RVM/other techniques, but if you do not have an idea of inputs/outputs it is waste of time.
     
    userque likes this.
  8. RedRat

    RedRat

  9. Again you are playing with directions or magnitude?
     


  10. Try using multiple time frames of the same dataset and the same period indicators for each... Like 2 period momentum across the board... You might get some better results depending on how technically traded the market you're looking at is... Although even then I still think you're better to model average over prediction methods
     
    #10     Apr 9, 2010