4 views

Uploaded by aaron

Noise removal in trading prices by removing high velocity nodes from a discrete signal.

- solving inequalities
- inpho-soln-11
- cp10
- Applied Maths-2017 Updated
- Square Root and Cube Root
- MA195J14 LT2 Hyunsang Soliven Soto
- Course Schedule 2014
- Convolution Integral
- resume - stephen besson
- Applied Mathematical Sciences With Biological and Ecological Modelling MSc
- Root Locus
- FEM IA -1 QP
- Lecture 22 Refining the RL sketch.pptx
- extra credit paper 2
- Chapter_1
- 210 test 553
- BC Assignments
- HeatflowBrownianmotionandNewtoniancapacity[Retrieved:2014!07!10]
- 4 Column Pile Cap With Property Line
- Integral Calculus Basic Integral

You are on page 1of 6

Abstract

In this paper we present the MAMATH process for noise removal and demonstrate its validity when

applied to the stock market.

1. Introduction

Forecasting the stock market has been one of the great problems ever since the birth of the stock

market. One of the issues with predicting where a stocks trading price will be is that a great deal of the

data is simply noise induced by investor confidence, information asymmetries, market sector, and

trading volume.

We do not live in a world of perfect certainty, and the value of trading prices is often a

misrepresentation of the stocks current value. In order to paint a clearer picture of a stocks true value,

it is critical to reduce the distortion of ambiguous variables. In the world of trading, these variables are

identified as noise; the price data that distorts the picture of the underlying trend. A stocks price is

supposed to represent perfect information on that companies financial standing; however, things like

investor confidence, asymmetrical information, market sector, and trading volume are all external

factors that add noise to the price of a companies stock

The Fourier transform has been the most widely used tool in signal analysis for the last century

and with good reason; it comes in many flavors each with something useful. For the MAMATH

process, the discrete Fourier cosine transform of the second kind(DCT-II)

1 #I

p 1

(1) F2 ({ur }rI ) =

#I

u

r =1

r cos

#I

r - ( s - 1)

2

1 n

p 1

( 3) F3 ({ur }rI ) = u

1

n

+ 2

r =2

ur cos ( r - 1) s -

n 2

( 4 ) F2 -1 = F3

are used. It is a well known fact that the DCT-II transform distributes the greatest amount of the signals

energy in each term. It is this fact and the discrete nature of the problem which are exploited.

The differential equation at the center of the MAMATH process,

n F3 {[ F2 ( S ) ] nI }

( 5) =0

n s n

may seem trivial and it is for a small number of data points. However it becomes extremely difficult to

solve when dealing with large data sets. The stock market moves in discrete units of one millisecond

thus the amount of data increases incredibly quickly. To actually perform noise removal in real time we

looked for a more computable solution. Interpolation over finite intervals by use of Lagrange

polynomials is just that solution. Lagrange polynomials were chosen because it is trivially simple to

compute their zeroes and they tend not to suffer from Runge's phenomenon, as Taylor polynomials do.

k

( 7 ) L ( x ) := y j l j ( x )

j =0

x - xm

(8)Where l j ( x ) :=

0 m< k x j - xm

m j

Figure 1. (left) The derivative of the Fourier series and the points used to generate the (center)

Lagrange polynomial and (right) the Taylor series

F3 {[ F2 ( S ) ] nI }

( 6) =0

s

2 F3 {[ F2 ( S ) ] nI } F3 {[ F2 ( S ) ] nI }

( 5) + =0

s 2 s

The two cases both reduce noise but differ in an interesting way. For low values of n it appears that the

amount of noise reduction increases as the number of derivatives taken increases. Our measure for

noise reduction is the variance measured in the data when the data is normalized against a 3rd degree

best fit polynomial calculated using a generalized least squares method. The following is a table

documenting the variance of several examples.

0.016306 0.013723 0.002634 0.695147 0.692049 0.661991

0.351998 0.337652 0.313789 0.771831 0.767788 0.743432

0.368998 0.35024 0.326789 1.09519 1.08348 1.06542

0.38579 0.355584 0.344283 1.5468 1.52975 1.51918

3. Data Analysis

The trading price for General Electric is in red, the noise reduction for n=1 is in blue, n=2 is in orange.

Figure 2: October 20th to November 11th of 2013

Figure 4. October 22nd to November 20th of 2013

4. Conclusion

Although not investigated in this paper, an interesting case would be the alternative equation,

n F3 {[ F2 ( S )] nI }

( )

8 =0

n s n

Noise removal is one of the most important aspects of active trading. By employing noise-

removal techniques, traders can avoid false signals and get a clearer picture of an overall trend. With

high volatility in stock movements and a noisier market environment, formal technical analysis

indicators such as support and resistance levels can be misleading. To make more accurate stock

predictions, reducing noise in these markets is critical.

References

No references were used. Everything was constructed either from scratch or with the help of

Mathematica's help files.

5. Code

Data[a_,b_,g_,d_,e_,z_]:=Flatten[Delete[FinancialData["GE",{{a,b,g}, {d,e,z}}],Table[{n,1},

{n,1,Length[FinancialData["GE",{{a,b,g}, {d,e,z}}]],1}]]]

RegressionNormalized[DATA_]:=DATA-

With[{Len=Length[DATA],Lin=With[{F=DATA},Normal[NonlinearModelFit[F,a +b *x^2+c*x^3,

{a,b,c},x]]]},Table[Block[{x=n},Lin],{n,1,Len,1}]]

ApproximateNoiseReducedDataFull[DATA_]:=With[{B=Length[DATA]},With[{A=With[{S=Reverse[

With[{N=Block[{O=With[{data=FourierDCT[DATA]},

(Length[data]^(-1/2))*(First[data]+2*Sum[Part[data,r]*Cos[(p/Length[data])(r-1)(s-(1/2))],

{r,2,Length[data]}])]},

With[{h=With[{D=D[O,s]},

DeleteDuplicates[Round[Flatten[ParallelTable[Quiet[Select[x/.With[{f=InterpolatingPolynomial[Table

[{s,D},{s,n,n+.5,1/10}],x]},NSolve[f0,x,WorkingPrecision10]],n#n+.5&]],{n,0,B+1,.5}]],10.^-

10]]]},

Riffle[h,Block[{s=h},O]]]]},Block[{L=Length[N],K=Length[DATA]},With[{M=Flatten[Table[(Part[N

,2*n+2]-Part[N,2*n])/(Part[N,2*n+1]-Part[N,2*n-1])*(x-Part[N,2*n-1])+Part[N,2*n],{n,1,L/2-1,1}]]},

Union[{{Part[M,2],1x<Part[N,5]}},{{Last[M],Part[N,L-

2]xK}},Table[{Part[M,n],Part[N,2n-1]x<Part[N,2n+1]},{n,3,L/2-2,1}]]]]]

]},Piecewise[S]]},Table[Block[{x=n},A],{n,1,B}]]]

ApproximateNoiseReducedDataFull2[DATA_]:=With[{B=Length[DATA]},With[{A=With[{S=Revers

e[

With[{N=Block[{O=With[{data=FourierDCT[DATA]},

(Length[data]^(-1/2))*(First[data]+2*Sum[Part[data,r]*Cos[(p/Length[data])(r-1)(s-(1/2))],

{r,2,Length[data]}])]},

With[{h=With[{D=D[O,{s,2}]},

DeleteDuplicates[Round[Flatten[ParallelTable[Quiet[Select[x/.With[{f=InterpolatingPolynomial[Table

[{s,D},{s,n,n+.5,1/10}],x]},NSolve[f0,x,WorkingPrecision10]],n#n+.5&]],{n,0,B+1,.5}]],10.^-

10]]]},

Riffle[h,Block[{s=h},O]]]]},Block[{L=Length[N],K=Length[DATA]},With[{M=Flatten[Table[(Part[N

,2*n+2]-Part[N,2*n])/(Part[N,2*n+1]-Part[N,2*n-1])*(x-Part[N,2*n-1])+Part[N,2*n],{n,1,L/2-1,1}]]},

Union[{{Part[M,2],1x<Part[N,5]}},{{Last[M],Part[N,L-

2]xK}},Table[{Part[M,n],Part[N,2n-1]x<Part[N,2n+1]},{n,3,L/2-2,1}]]]]]

]},Piecewise[S]]},Table[Block[{x=n},A],{n,1,B}]]]

data[i_]:=Block[{m=Floor[12*Random[]]+1,n=Floor[28*Random[]]+1,o=Floor[12*Random[]]

+1,p=Floor[28*Random[]]+1},Data[2011,m,n,2012,o,p]]

Table[With[{H=data[1]},

{Variance[RegressionNormalized[H]],Variance[RegressionNormalized[ApproximateNoiseReducedDat

aFull[H]]],Variance[RegressionNormalized[ApproximateNoiseReducedDataFull2[H]]]}],{10}]

- solving inequalitiesUploaded byapi-304977850
- inpho-soln-11Uploaded byKVishalReddy
- cp10Uploaded byemmalii
- Applied Maths-2017 UpdatedUploaded byMuhammad Ishtiaq
- Square Root and Cube RootUploaded bymecitfuturedreams
- MA195J14 LT2 Hyunsang Soliven SotoUploaded byRiemann Soliven
- Course Schedule 2014Uploaded bySangeeth.Kp
- Convolution IntegralUploaded byPuneet Bahri
- resume - stephen bessonUploaded byapi-263666183
- Applied Mathematical Sciences With Biological and Ecological Modelling MScUploaded bySamuel Jr.
- Root LocusUploaded byMr. G. Deenadayalan Assistant Professor I - MECHATRONICS
- FEM IA -1 QPUploaded byHari Krishnan
- Lecture 22 Refining the RL sketch.pptxUploaded byHamza Khan
- extra credit paper 2Uploaded byapi-306606954
- Chapter_1Uploaded bysadhubalaamarnath
- 210 test 553Uploaded byMichael Gboneh
- BC AssignmentsUploaded byDCSAW
- HeatflowBrownianmotionandNewtoniancapacity[Retrieved:2014!07!10]Uploaded byTomas Kojar
- 4 Column Pile Cap With Property LineUploaded byGoogle User
- Integral Calculus Basic IntegralUploaded byLars Rembrandt
- Jacobi AnUploaded byal7123
- AssignmentUploaded byAsmelash Teka
- GATEUploaded byJitendra Maurya
- 219219736-Signals-Systems-Jan-2014.pdfUploaded byKomal
- 8212HW1-AKUploaded byironmonkey288
- Chapter 7 Buckling of BarsUploaded byhanipa
- MRP as an LP notesUploaded byhmurcia
- Practica 3Uploaded byScrib_3
- 08 Intersection CurvesUploaded byAlberto Cano
- Plane TripsUploaded byThomas Kundera

- 525_ftp.pdfUploaded byRoberto Catalani
- msp430g2231-ep.pdfUploaded bySandra Cantu
- How to Get Rid of Gum Infection (Gingivitis) NaturallyUploaded byRogelio
- (744985916) sps23059Uploaded byvalentineseftiana
- Niklas Luhmann Quod Omnes TangitUploaded bycrispasion
- Experiment Number FourUploaded bybtkanarim
- Khoja Akhmet YassawiUploaded byScottie Green
- DR RAU Pleomorphic On_the_NatureUploaded byEleoura
- artcile 05aUploaded byZeeSEO
- ManagingUploaded byksbanwar
- Axiotou the Dilemma of SlaveryUploaded byamnatehreem
- Mechanics Virtual Work Kaleem ArifUploaded byarslansaeedarslan
- Cohoes7.22 to 8.1.11Uploaded bytulocalpolitics
- Settlement Analyses of Grade Supported Tanks Constructed With ThUploaded byvirat_dave
- Angelelli C - Validating Professional Standards and CodesUploaded byMaria Aguilar
- LTD Cases Land Registration Part 2Uploaded byAudrey
- The Study of Fabric Performance for Car SeatsUploaded byAnonymous yDGxIbQd
- 23661207 Dominos Pizza Human Resourse CopyUploaded byVandita Rannsingh
- Horus Character SheetUploaded byRichard Lee McComas
- Sap Tables 1Uploaded bytarakeshc2591
- Visio-Pre Prod Flowchart 090924 v10Uploaded byWalter Olivas Saldaña
- Wacholder, Ben Zion. Nicolaus of Damascus, 1962Uploaded byomnisanctus_new
- The World English Bible (WEB): Isaiah by AnonymousUploaded byGutenberg.org
- 8 Kingdom Principles of Sowing and ReapingUploaded byadelani_oni
- TPS Scholarship DatabaseUploaded byFletcherGuidance
- Wasteland [PC] ManualUploaded byJames Eagel
- Teach SsUploaded byInacio Barbosa-Pr
- case lawUploaded bymanoj_pker
- Progress Report Performa for the GroupUploaded byKarishma Trehan
- 123BW032017Uploaded byVara Lakshmi