Investigation of the potential of the moving average crossover trading strategy: Evaluation of a trading strategy in nine historical time periods
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesisAlternative title
Undersökning av potentialen hos den glidande medelvärdesstrategin : Utvärdering av en handelsstrategi över nio historiska tidsperioder (Swedish)
Abstract [en]
The Moving average crossover strategy (MACS) is a widely used technique in financial markets where two moving averages are used to identify trends and make trading decisions. However, the effectiveness of this strategy largely depends on the chosen length parameters for the moving averages. The moving averages identify trends in a market price and help investors decide when to buy and sell. The moving average crossover strategy uses two averages called the short and long moving averages. The long moving average covers a larger timespan compared to the short moving average. The length parameters for the short and long moving averages are usually set to 40 and 140 but they might not necessarily be the most efficient combination. This study is about investigating the potential of the optimal combination of the two length parameters for the moving averages. We evaluate the performance in historical markets based on the net gain in a financial market following a number of trades. In the study we also compare the MACS to the common and usually profitable strategy of simply buying and holding a security in the same timeframe. To optimize the length parameters a digital testing environment is created. The environment takes historical data of market prices during a specific period and applies the MACS with adjustable averages lengths on the data uploaded by the user. The environment then creates a 3D-graph measuring net gain or the net loss, that is the increase or decrease in value of an investment as a function of average length of the two moving averages. Historical data for the S and P 500, gold, and bitcoin are used. After finding the optimal moving average crossover length parameters, the strategy’s net gain is compared to the outcome of buying and holding the security for the same amount of time. The results show that simply buying and holding a security consistently outperforms the moving average crossover strategy when the standard length parameters of 40 and 140 are used, but the MACS using optimal length parameters often outperforms buying and holding. The results also show that the optimal length for the long and short moving averages often are close to one another.
Abstract [sv]
Glidande medelvärdestrategin (MACS) är en ofta använd strategi inom finansiella marknader där två glidande medelvärden används för att identifiera trender och fatta handelsbeslut. Effektiviteten av denna strategi beror till stor del på de valda längdparametrarna för de glidande medelvärderna. De glidande medelvärderna identifierar trender i marknadspris för värdepapper och hjälper investerare att besluta när de ska köpa och sälja. Den glidande medelvärdestrategin använder två medelvärden, det korta och det långa glidande medelvärdet. Det långa glidande medelvärdet täcker en större tidsperiod jämfört med det korta glidande medelvärdet. Längdparametrarna för det korta och långa glidande medelvärdet är vanligtvis satta till 40 respektive 140 men de värderna måste inte vara den mest effektiva kombinationen. Denna studie undersöker potentialen hos den optimala kombinationen av längdparametrarna för de två glidande medelvärderna. Vi utvärderar resultatet från historiska marknader baserat på nettoavkastningen under en tidsperiod efter ett antal handelsbeslut. I studien jämför vi också MACS med den vanligt använda och ofta lönsamma strategin att helt enkelt köpa och hålla ett värdepapper under en tidsperiod. För att optimera parametrarna skapas en digital testmiljö. Miljön tar historiska data över marknadspriser under en specifik tidsperiod och använder glidande medelvärdesstrategin med justerbara längdparametrar för medelvärden på den historiska datan som användaren laddar upp. Miljön genererar sedan en 3D- graf som visar nettoökningen eller nettoförlusten, det vill säga värdeökningen eller världeförlusten på en investeringsstrategi som en funktion baserad på längden på de två glidande medelvärderna. Historiska data för SP 500, guld och bitcoin används. Efter att ha hittat de optimala längdparametrarna för glidande medelvärdesstrategin jämförs strategins nettoavkastning med resultatet av att köpa och hålla det valda värdepappret under samma tidsperiod. Resultaten visar att att köpa och hålla ett värdepapper ofta överträffar glidande medelvärdesstrategin när standardparametrarna 40 och 140 används, men att MACS med optimala parametrar ofta överträffar att köpa och hålla. Resultaten visar också att de optimala längderna för det långa och det korta glidande medelvärdet ofta ligger nära varandra.
Place, publisher, year, edition, pages
2025. , p. 44
Series
TRITA-EECS-EX ; 2025:34
Keywords [en]
Moving Average Crossover Strategy, Technical Analysis, Market, Trading
Keywords [sv]
Glidande Medelvärden, Teknisk Analys, Marknad, Handel
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-361839OAI: oai:DiVA.org:kth-361839DiVA, id: diva2:1948907
Supervisors
Examiners
2025-05-072025-04-012025-05-07Bibliographically approved