2,754 research outputs found

    Investment Trading And Risk Management: Scientifically Developing and Analyzing Trading Systems

    Get PDF
    The purpose of this IQP project is to scientifically develop profitable systems and indicators for trading in the markets. The project consists of nine individually developed strategies, which were quantitatively analyzed for profitability and then combined into a system of systems. Each individual system or indicator was given defined rules and then allocated simulated money to trade. Two types of systems were mainly developed, predictive and confirmative, leading to a system of systems that incorporated a predictive layer and a confirmative layer in the decision to take positions

    Stock Market Analysis

    Get PDF
    With the recent financial crisis in America, investors have received much of the blame and have been tasked with improving investment techniques to prevent another recession of similar magnitude. Here we look to develop new methods for investing using algorithms that automate the process of deciding whether to buy, sell, or avoid a stock. These algorithms use both technical and fundamental data to improve investing success by removing the factor of human emotion from trading, reducing risk of loss due to greed. We ultimately find that with a careful application of technical and fundamental data, as well as a thorough understanding patterns in financial markets, it is possible to develop an automated trading strategy that can profitably trade stocks and currencies

    Machine Learning Applications on Algorithmic Trading in the Foreign Exchange Market

    Get PDF
    Nowadays, the largest share of trades done in market exchanges are made by computers. This has been proving to be the main way to invest in the various exchanges. Since the turn of the 20th century, the total volume of trades performed automatically by machines in the United States stock market as gone up from 15% to around 80%. Similarly, in the foreign exchange market, the largest market of the world with over 6 trillion US dollars in daily trade volume during 2019, it is estimated that the large majority of trades are also made by computers. With the possibility of using machines to trade for us, it makes sense to consider a mathematical theory that deals with modeling prices and financial products, and to program a software to take advantage of this information. Since the last century, another type of models have also been developed that have the capability of adapting themselves, or learn, with the information that they are provided. The objective of this thesis is to implement a strategy that benefits from the information generated by a machine learning model. This required an in-depth research on the underlying theory for this type of models, which is carefully defined here. Besides this, we developed a system that trades automatically for us, including a detailed backtesting engine that permitted to test this strategy, among others, in a simulated environment before using it in the market. This automatic trading system was meticulously designed to ensure extensibility and robustness purposing to explore as many strategies and models as needed, including machine learning approaches, based on a large set of user configurations. Subsequently, the foreign exchange market was used to live-run our strategies, which is open 24h a day during weekdays and is highly liquid. As a benchmark, other more common strategies were also tested and the predictive capability of the machine learning model was compared with an established mathematical model, the autoregressive integrated moving average model.Hoje em dia, a maior parte dos negócios em bolsa são feitos por computadores. Esta tem vindo a provar-se ser a forma principal de investir nas várias bolsas. Desde o virar do século 20, o volume total de negócios feitos por máquinas no mercado de ações dos Estados Unidos aumentou de 15% para cerca de 80%. Da mesma forma, no mercado de câmbio, o maior mercado do mundo com mais de 6 triliões de dólares americanos em volume de negócios diariamente durante 2019, é estimado que a larga maioria do total de negócios seja também feita por computadores. Com a possibilidade de usar máquinas para fazer negócios por nós, faz sentido considerarmos uma teoria matemática que trate de modelar preços e produtos financeiros, e desenvolver um programa que tome partido desta informação. Desde o século passado, tem-se desenvolvido também outro tipo de modelos que têm a capacidade de se adaptar, ou aprender, com a informação que lhes é passada. O objetivo desta dissertação passa por implementar uma estratégia que tome partido da informação gerada por um modelo de aprendizagem automática. Para tal, realizou-se uma pesquisa aprofundada sobre a teoria subjacente a este tipo de modelos, que definimos cuidadosamente aqui. Para além disto, foi desenvolvido um sistema que faz os negócios automaticamente por nós, incluindo um mecanismo de backtesting que permite testar esta estratégia, entre outras, num ambiente simulado antes de a usar no mercado. Este sistema de negociação automático foi projetado meticulosamente para garantir extensibilidade e robustez com o intuito de explorar tantas estratégias e modelos quanto necessárias, incluindo abordagens de aprendizagem automática, baseado num conjunto de configurações definidas pelo utilizador. Subsequentemente, usámos o mercado de câmbio para correr as nossas estratégias ao vivo, que está aberto 24h por dia durante os dias de semana, e é altamente líquido. Como referência, foram também testadas outras estratégias mais comuns e a capacidade preditiva do modelo de aprendizagem automática foi comparado com um modelo matemático estabelecido, o modelo auto-regressivo integrado de médias móveis

    Development of a cryptocurrency bot

    Get PDF
    As an emerging market and research direction, cryptocurrencies and cryptocurrency trading have seen considerable progress and a notable upturn in interest and activity, even entering the market people without experience or sufficient knowledge. In addition, the tremendous volatility and the fact that this market never closes make the human factor affect crypto asset trading too much. Hence, in this project a cryptocurrency trading bot is developed. To be exact, the algorithm consists of two distinguishable parts: the bot itself and the backtesting. Notwithstanding that both parts departs from the analysis of financial markets in general, and cryptocurrencies in particular, both present clear differences in terms of code and pretext. On the one hand, the bot’s algorithm is used to trade in reality, specifically through the Binance exchange. Here the user plays risks their monetary capital. On the other hand, backtesting consists of verifying the trading strategy based on historical data. Backtesting serves, then, as validation of the strategy to be followed by the bot. Thus, all the necessary fundamentals to understand both the general cryptocurrency context and technical analysis relevant concepts are presented, along with a detailed explanation of the implemented algorithm and a proper analysis of the obtained results. Finally, further code improvements and new ideas to develop in the future are suggested, apart from presenting the code developed

    Machine Learning-Driven Decision Making based on Financial Time Series

    Get PDF
    L'abstract è presente nell'allegato / the abstract is in the attachmen

    Building and investigating generators' bidding strategies in an electricity market

    Get PDF
    In a deregulated electricity market environment, Generation Companies (GENCOs) compete with each other in the market through spot energy trading, bilateral contracts and other financial instruments. For a GENCO, risk management is among the most important tasks. At the same time, how to maximise its profit in the electricity market is the primary objective of its operations and strategic planning. Therefore, to achieve the best risk-return trade-off, a GENCO needs to determine how to allocate its assets. This problem is also called portfolio optimization. This dissertation presents advanced techniques for generator strategic bidding, portfolio optimization, risk assessment, and a framework for system adequacy optimisation and control in an electricity market environment. Most of the generator bidding related problems can be regarded as complex optimisation problems. In this dissertation, detailed discussions of optimisation methods are given and a number of approaches are proposed based on heuristic global optimisation algorithms for optimisation purposes. The increased level of uncertainty in an electricity market can result in higher risk for market participants, especially GENCOs, and contribute significantly to the drivers for appropriate bidding and risk management tasks for GENCOs in the market. Accordingly, how to build an optimal bidding strategy considering market uncertainty is a fundamental task for GENCOs. A framework of optimal bidding strategy is developed out of this research. To further enhance the effectiveness of the optimal bidding framework; a Support Vector Machine (SVM) based method is developed to handle the incomplete information of other generators in the market, and therefore form a reliable basis for a particular GENCO to build an optimal bidding strategy. A portfolio optimisation model is proposed to maximise the return and minimise the risk of a GENCO by optimally allocating the GENCO's assets among different markets, namely spot market and financial market. A new market pnce forecasting framework is given In this dissertation as an indispensable part of the overall research topic. It further enhances the bidding and portfolio selection methods by providing more reliable market price information and therefore concludes a rather comprehensive package for GENCO risk management in a market environment. A detailed risk assessment method is presented to further the price modelling work and cover the associated risk management practices in an electricity market. In addition to the issues stemmed from the individual GENCO, issues from an electricity market should also be considered in order to draw a whole picture of a GENCO's risk management. In summary, the contributions of this thesis include: 1) a framework of GENCO strategic bidding considering market uncertainty and incomplete information from rivals; 2) a portfolio optimisation model achieving best risk-return trade-off; 3) a FIA based MCP forecasting method; and 4) a risk assessment method and portfolio evaluation framework quantifying market risk exposure; through out the research, real market data and structure from the Australian NEM are used to validate the methods. This research has led to a number of publications in book chapters, journals and refereed conference proceedings

    Enhancing Financial Hedging Strategies through Modern Computational Methods

    Get PDF
    El "pairs trading" és una estratègia de fons de cobertura que es beneficia dels moviments relatius entre els preus de dos actius financers cointegrats, aprofitant les divergències temporals respecte a l'equilibri a llarg termini. La cointegració es manifesta quan els preus dels actius tenen tendència a moure's conjuntament a causa d'una relació econòmica subjacent, com ara dues empreses que operen dins de la mateixa cadena de valor. Identificant aquests parells, els inversors poden aprofitar les discrepàncies de preus temporals, amb l'expectativa que convergeixin finalment al seu valor d’equilibri. No obstant això, les cointegracions entre parells d'actius poden debilitar-se amb el temps, i una possible ruptura de la cointegració comporta el risc de pèrdues si no s'identifica i es gestiona de manera proactiva. Aquest treball de fi de grau es centra en una exploració quantitativa dels principis fonamentals del "pairs trading" al mercat d'accions, alhora que desenvolupa un algoritme d’inversió i de gestió de risc aplicable a casos reals. L'objectiu de l'algoritme és identificar de manera eficaç parells d'accions cointegrats, executar operacions i monitorar activament la cointegració per detectar possibles riscos de futura ruptura. Per substanciar les troballes i arribar a conclusions exhaustives, s'ha estudiat un extens dataset que inclou les dades de mercat de 117 accions des de novembre de 2020 fins a gener de 2022. Totes les troballes presentades en la memòria, juntament amb les figures i taules adjuntes, s'han obtingut mitjançant l'anàlisi quantitativa en Python d'aquest conjunt de dades. L’informe comença amb una visió general de les estratègies de fons de cobertura i aprofundeix en els fonaments del "pairs trading", posant èmfasi en la importància de la cointegració entre actius i els reptes que es presenten actualment. Un cop s'ha discutit el marc teòric, s'inicia la recerca de resultats quantitatius, on es pre-processen les dades per tal de trobar actius cointegrats, dissenyar l’estratègia quantitativa d’inversió de forma neutral a mercat i presentar resultats de "backtests" per avaluar el rendiment i la rendibilitat de l’algoritme. Més endavant, s'utilitzen tècniques avançades d'aprenentatge automàtic per monitorar la cointegració i abordar el risc de ruptura. Les conclusions d'aquest treball de fi de grau revelen resultats significatius sobre l'efectivitat de l'estratègia de "pairs trading" i l'ús de tècniques d'aprenentatge automàtic en aquest context. S'ha determinat que els parells d'actius cointegrats mostren un rendiment notablement superior als parells no cointegrats, amb un rendiment anual mitjà de l’algoritme del 57,68% durant el 2020, superant àmpliament els referents del mercat. A més, s'ha demostrat que la capacitat de predir amb precisió l'evolució de la cointegració és crucial per evitar pèrdues financeres. Mitjançant l'ús d'un model de "random forest", s'ha aconseguit identificar amb una gran precisió els parells que perden cointegració amb dues setmanes d'antelació. Aquests resultats demostren l'enorme potencial de l'aprenentatge automàtic en les estratègies financeres quantitatives per gestionar el risc i prendre decisions informadesEl "pairs trading" es una estrategia de cobertura que tiene como objetivo capitalizar los movimientos relativos de los precios de dos activos financieros cointegrados, aprovechando las divergencias temporales respecto al equilibrio a largo plazo. La cointegración se observa cuando los precios de los activos tienden a moverse juntos debido a una relación económica subyacente, como dos empresas que operan en la misma cadena de valor. Identificando estos pares, los inversores pueden aprovechar las discrepancias de precios, con la expectativa de que converjan finalmente a su valor de equilibrio. Sin embargo, las cointegraciones entre pares de activos pueden debilitarse con el tiempo, y una posible ruptura de la cointegración conlleva el riesgo de pérdidas si no se identifica y gestiona de manera proactiva. Este trabajo de fin de grado se centra en una exploración cuantitativa de los principios fundamentales del "pairs trading" en el mercado de acciones, al tiempo que desarrolla un algoritmo de inversión y gestión de riesgos aplicable a casos reales. El objetivo del algoritmo es identificar de manera eficaz pares de acciones cointegrados, ejecutar operaciones y monitorear activamente la cointegración para detectar posibles riesgos de futura ruptura. Para respaldar los hallazgos y llegar a conclusiones exhaustivas, se ha estudiado un extenso dataset que incluye los precios de mercado de 117 acciones desde noviembre de 2020 hasta enero de 2022. Todos los hallazgos presentados en el informe, junto con las figuras y tablas adjuntas, se han obtenido mediante el análisis cuantitativo en Python de este conjunto de datos. El informe comienza con una visión general de las estrategias de cobertura y profundiza en los fundamentos del "pairs trading", poniendo énfasis en la importancia de la cointegración entre activos y los desafíos que se presentan en la actualidad. Una vez discutido el marco teórico, se inicia la búsqueda de resultados cuantitativos, donde se preprocesan los datos para encontrar activos cointegrados, diseñar la estrategia cuantitativa de inversión de forma neutral al mercado y presentar resultados de "backtests" para evaluar el rendimiento y la rentabilidad del algoritmo. Más adelante, se utilizan técnicas avanzadas de aprendizaje automático para monitorear la cointegración y abordar el riesgo de ruptura. Las conclusiones de este trabajo de fin de grado revelan resultados significativos sobre la efectividad de la estrategia de "pairs trading" y el uso de técnicas de aprendizaje automático en este contexto. Se ha determinado que los pares de activos cointegrados muestran un rendimiento notablemente superior a los pares no cointegrados, con un rendimiento anual promedio del algoritmo del 57,68% durante 2020, superando ampliamente los puntos de referencia del mercado. Además, se ha demostrado que la capacidad de predecir con precisión la evolución de la cointegración es crucial para evitar pérdidas financieras. Mediante el uso de un modelo de "random forest", se ha logrado identificar con una gran precisión los pares que pierden cointegración con dos semanas de anticipación. Estos resultados demuestran el enorme potencial del aprendizaje automático en las estrategias financieras cuantitativas para gestionar el riesgo y tomar decisiones informadasPairs trading is a hedge fund strategy that aims to capitalize on the relative price movements of two cointegrated assets by exploiting temporary price divergences from the long-term equilibrium. Cointegration occurs when asset prices tend to move together due to an underlying economic relationship, such as two companies operating within the same value chain. By identifying these pairs, investors can profit from temporary price discrepancies, with the expectation that they will eventually converge to their equilibrium value. However, cointegrations between asset pairs can weaken over time, and a potential breakdown of cointegration poses the risk of losses if not identified and managed proactively. This bachelor’s thesis focuses on a quantitative exploration of the fundamental principles of pairs trading in the stock market while developing an investment and risk management algorithm applicable to real cases. The algorithm's objective is to effectively identify cointegrated stock pairs, execute trades, and actively monitor cointegration to detect potential breakdown risks. To substantiate the findings and reach comprehensive conclusions, an extensive dataset including market data for 117 equity assets from November 2020 to January 2022 has been studied. All the findings presented in the report, along with the accompanying figures and tables, have been obtained through the quantitative analysis in Python of this dataset. The report begins with an overview of hedge fund strategies and delves into the foundations of pairs trading, emphasizing the importance of asset cointegration and the challenges presented in the current context. Once the theoretical framework is discussed, the search for quantitative results begins, where the data is preprocessed to find cointegrated assets, the quantitative investment strategy is designed, and the backtest results are evaluated to assess the performance and profitability of the algorithm. Advanced machine learning techniques are then employed to monitor cointegration and address the risk of breakdown. The conclusions of this undergraduate thesis reveal significant results regarding the effectiveness of pairs trading strategies and the use of machine learning techniques in this context. It has been determined that cointegrated asset pairs exhibit significantly higher performance than non- cointegrated pairs, with an average annual return of 57.68% during 2020, far surpassing market benchmarks. Moreover, it has been demonstrated that accurately predicting the evolution of cointegration is crucial to avoid financial losses. By leveraging a random forest model, pairs losing cointegration have been identified two weeks in advance with a significant accuracy rate. These results showcase the tremendous potential of machine learning in quantitative financial strategies to manage risk and make informed decision

    Forex Trading System Development

    Get PDF
    This Interactive Qualifying Project introduces the Foreign Exchange market with an emphasis on fundamental and technical parameters, in order to get started as a Forex trader. The purpose of this project is to systematically create a profitable trading strategy in the Forex market. The group used $100,000 each in a simulated account to trade different currency pairs on the TradeStation platform. During this process, two students in the group selected manual trading systems and the other two chose to trade automatically. After collecting the data, the group would compare the profits and constructed a most profitable system

    TSFDC: A Trading strategy based on forecasting directional change

    Get PDF
    Directional Change (DC) is a technique to summarize price movements in a financial market. According to the DC concept, data is sampled only when the magnitude of price change is significant according to the investor. In this paper, we develop a contrarian trading strategy named TSFDC. TSFDC is based on a forecasting model which aims to predict the change of the direction of market’s trend under the DC context. We examine the profitability, risk and risk-adjusted return of TSFDC in the FX market using eight currency pairs. We argue that TSFDC outperforms another DC-based trading strategy

    Technical and Fundamental Features Analysis for Stock Market Prediction with Data Mining Methods

    Get PDF
    Predicting stock prices is an essential objective in the financial world. Forecasting stock returns and their risk represents one of the most critical concerns of market decision makers. This thesis investigates the stock price forecasting with three approaches from the data mining concept and shows how different elements in the stock price can help to enhance the accuracy of our prediction. For this reason, the first and second approaches capture many fundamental indicators from the stocks and implement them as explanatory variables to do stock price classification and forecasting. In the third approach, technical features from the candlestick representation of the share prices are extracted and used to enhance the accuracy of the forecasting. In each approach, different tools and techniques from data mining and machine learning are employed to justify why the forecasting is working. Furthermore, since the idea is to evaluate the potential of features in the stock trend forecasting, therefore we diversify our experiments using both technical and fundamental features. Therefore, in the first approach, a three-stage methodology is developed while in the first step, a comprehensive investigation of all possible features which can be effective on stocks risk and return are identified. Then, in the next stage, risk and return are predicted by applying data mining techniques for the given features. Finally, we develop a hybrid algorithm, based on some filters and function-based clustering; and re-predicted the risk and return of stocks. In the second approach, instead of using single classifiers, a fusion model is proposed based on the use of multiple diverse base classifiers that operate on a common input and a meta-classifier that learns from base classifiers’ outputs to obtain a more precise stock return and risk predictions. A set of diversity methods, including Bagging, Boosting, and AdaBoost, is applied to create diversity in classifier combinations. Moreover, the number and procedure for selecting base classifiers for fusion schemes are determined using a methodology based on dataset clustering and candidate classifiers’ accuracy. Finally, in the third approach, a novel forecasting model for stock markets based on the wrapper ANFIS (Adaptive Neural Fuzzy Inference System) – ICA (Imperialist Competitive Algorithm) and technical analysis of Japanese Candlestick is presented. Two approaches of Raw-based and Signal-based are devised to extract the model’s input variables and buy and sell signals are considered as output variables. To illustrate the methodologies, for the first and second approaches, Tehran Stock Exchange (TSE) data for the period from 2002 to 2012 are applied, while for the third approach, we used General Motors and Dow Jones indexes.Predicting stock prices is an essential objective in the financial world. Forecasting stock returns and their risk represents one of the most critical concerns of market decision makers. This thesis investigates the stock price forecasting with three approaches from the data mining concept and shows how different elements in the stock price can help to enhance the accuracy of our prediction. For this reason, the first and second approaches capture many fundamental indicators from the stocks and implement them as explanatory variables to do stock price classification and forecasting. In the third approach, technical features from the candlestick representation of the share prices are extracted and used to enhance the accuracy of the forecasting. In each approach, different tools and techniques from data mining and machine learning are employed to justify why the forecasting is working. Furthermore, since the idea is to evaluate the potential of features in the stock trend forecasting, therefore we diversify our experiments using both technical and fundamental features. Therefore, in the first approach, a three-stage methodology is developed while in the first step, a comprehensive investigation of all possible features which can be effective on stocks risk and return are identified. Then, in the next stage, risk and return are predicted by applying data mining techniques for the given features. Finally, we develop a hybrid algorithm, based on some filters and function-based clustering; and re-predicted the risk and return of stocks. In the second approach, instead of using single classifiers, a fusion model is proposed based on the use of multiple diverse base classifiers that operate on a common input and a meta-classifier that learns from base classifiers’ outputs to obtain a more precise stock return and risk predictions. A set of diversity methods, including Bagging, Boosting, and AdaBoost, is applied to create diversity in classifier combinations. Moreover, the number and procedure for selecting base classifiers for fusion schemes are determined using a methodology based on dataset clustering and candidate classifiers’ accuracy. Finally, in the third approach, a novel forecasting model for stock markets based on the wrapper ANFIS (Adaptive Neural Fuzzy Inference System) – ICA (Imperialist Competitive Algorithm) and technical analysis of Japanese Candlestick is presented. Two approaches of Raw-based and Signal-based are devised to extract the model’s input variables and buy and sell signals are considered as output variables. To illustrate the methodologies, for the first and second approaches, Tehran Stock Exchange (TSE) data for the period from 2002 to 2012 are applied, while for the third approach, we used General Motors and Dow Jones indexes.154 - Katedra financívyhově
    • …
    corecore