关键词 > Python代写

Genetic Programming on Time Series Analysis

发布时间:2021-12-27

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Genetic Programming on Time Series Analysis

 

Abstract

 

The project investigates genetic programming on time series analysis. Since most genetic programming modules do not support time series analysis (i.e., each set of independent variables now has a corresponding timestamp), the first step of the project is to add time series implementation to the gplearn module. The next step is to evaluate and improve the efficiency and accuracy, which is also the main goal of the project.

For the efficiency, the project investigates 3 parts, the time series operators (functions) on independent variables, the fitness functions on expressions, and the evolution from generation to generation. After the evaluation, the project uses Cython to speed up time series operators, data slicing to improve fitness function efficiency, and parallel processing to enhance evolution.

For the accuracy, the project investigates the predictive power of genetic program- ming on financial data (a typical time series data). For financial data, the algorithm aims to predict future price changes of stocks based on market metrics (bid, ask price, trading volume, etc.). To evaluate the accuracy, the project compares the expressions generated by genetic programming with simple benchmark expressions. To improve the accuracy, the project applies format and logic layers to filter out irrational expressions (for example, mathematical expressions with inconsistent unit like volume + price).

 

1   Introduction

Genetic programming (GP) is a deep learning algorithm aiming to find formulaic mathematical relations. Such analysis is often called symbolic regression.

 

1.1   Symbolic Syntax Tree Representation

One of the most essential ideas of genetic programming is the symbolic syntax tree representation of a mathematical expression. In each expression, we have a mix of variables, constants, and operators (functions). Each operator can be seen as a node and its operands can be seen as its children nodes. The terminal nodes can only be either variables or constants.  The idea can be easily illustrated through an example. Consider an expression Y = (X − |X2 |) + (eX3  + 5). In each expression, we have a mix of variables, constants, and operators (functions). Thus, the symbolic syntax tree representation of the example is as follows:




As shown above, each expression can be interpreted in a recursive manner. Each subtree is by itself an expression .


1.2   Genetic Programming Main Idea

Genetic programming begins from a population of mathematical expressions (formulas), can be either randomly generated or manually selected. Each expression represents a relationship between dependent variables and independent variables. Similar to the natural selection, each successive generation of expressions is evolved from its parent generation by first selecting the fittest individuals and then applying certain genetic operations.


2   Related Works

2.1   GP Time Series Implementation

The project builds the time series based on the python module gplearn. The module gplearn extends the scikit-learn library to perform genetic programming.

 

2.2   GP Efficiency and Accuracy Analysis

Kaboudan’s paper A measure of time series’ predictability using genetic programming applied to stock returns provides an evaluation method of GP on time series financial data.

Graff’s paper Time seriesforecasting with genetic programming compares the performance of genetic programming on time series data with traditional forecasting techniques.

Oussaidène’s paper Parallel genetic programming and its application to trading model induction introduces ways to implement parallel processing on genetic programming.

Zhang’s paper AutoAlpha: an Efficient Hierarchical Evolutionary Algorithmfor Mining Alpha Fac- tors in Quantitative Investment utilizes warm start method to improve accuracy and efficiency.         Pimenta’s paper An Automated Investing Method for Stock Market Based on Multiobjective Genetic Programming combines genetic programming together with other predictors including ARCH/GARCH, neural networks, etc. to enhance its performance.


3   Method / Algorithm

The main algorithm to use is the genetic programming based on the python gplearn module.