13.08.2022 Views

advanced-algorithmic-trading

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

271

19.8 Support Vector Machines

The motivation behind the extension of a SVC is to allow non-linear decision boundaries. This

is the domain of the support vector machine (SVM). Consider the following Figure 19.9. In

such a situation a purely linear SVC will have extremely poor performance, simply because the

data has no clear linear separation:

Figure 19.9: No clear linear separation between classes and thus poor SVC performance

Hence SVCs can be useless in highly non-linear class boundary problems.

In order to motivate how an SVM works we can use a standard "trick" that was mentioned

in the chapter on linear regression when considering non-linear situations. In particular a set

of p features x 1 , ..., x p can be transformed, say, into a set of 2p features x 1 , x 2 1, ..., x p , x 2 p. This

allows us to apply a linear technique to a set of non-linear features.

While the decision boundary is linear in the new 2p-dimensional feature space it is non-linear

in the original p-dimensional space. We end up with a decision boundary given by q(x) = 0

where q is a quadratic polynomial function of the original features and hence is a non-linear

solution.

Clearly this is not restricted to quadratic polynomial transformations. Higher-dimensional

polynomials, interaction terms and other functional forms can all be considered. The drawback

with this approach is that it dramatically increases the dimension of the feature space making

some algorithms computationally intractable.

The major advantage of SVMs is that they allow a non-linear enlargening of the feature space,

while still retaining a significant computational efficiency, using a process known as the "kernel

trick", which will be outlined below shortly.

So what are SVMs? In essence they are an extension of SVCs that results from enlargening

the feature space through the use of functions known as kernels. In order to understand kernels,

we need to briefly discuss some aspects of the solution to the SVC optimisation problem outlined

above.

While calculating the solution to the SVC optimisation problem the algorithm only needs

to make use of inner products between the observations and not the observations themselves.

Recall that an inner product is defined for two p-dimensional vectors u, v as:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!