Heuristické přístupy při řešení NP-těžkých úloh
Heuristic approaches in solving NP-hard problems
dc.contributor.advisor | Šoch Michal | |
dc.contributor.author | Tomáš Petříček | |
dc.date.accessioned | 2023-06-09T22:52:30Z | |
dc.date.available | 2023-06-09T22:52:30Z | |
dc.date.issued | 2023-06-09 | |
dc.identifier | KOS-1240469500405 | |
dc.identifier.uri | http://hdl.handle.net/10467/108889 | |
dc.description.abstract | Cílem práce je nalézt téměř optimální konfiguraci pro algoritmickou obchodní strategii za pomocí heuristik v rozumně krátkém čase. Čtenář je nejprve seznámen se třídami složitosti a heuristickými metodami, včetně těch použitých v praktické části: simulované ochlazování, genetický algoritmus a tabu prohledávání. Následuje popis algoritmického obchodování a fází, které lze automatizovat. Znalosti z obou těchto oborů jsou dány dohromady v sekci zaměřené na zpětné testování. Cílem zpětného testování je otestovat obchodní strategii na historických tržních datech, aby bylo možné provést úpravy a najít vhodnou konfiguraci předtím, něž je použita pro skutečné testování. Nalezení vhodné konfigurace je NP-těžký problém, nicméně lze použít heuristiky pro jeho nalezení v rozumném čase. Za účelem dosažení větší flexibility a rychlosti byl vytvořen vlastní framework napsaný v C++20. Historická simulace byla inspirována platformou TradingView a proces obchodování burzou Binance. Byly použity moderní prvky C++, jako jsou koncepty a korutiny. Důraz byl kladen na efektivní využití funkcí jazyka a prostředků počítače. Kromě heuristiky byl implementován také algoritmus hrubé síly, který byl paralelizován pomocí OpenMP k dosažení vyšší rychlosti. Heuristiky byly implementovány tak, aby byly flexibilní a snadno použitelné, proto byly použity návrhové vzory jako pozorovatel a strategie. Průběh a výsledky shromážděné během optimalizace byly uloženy do souborů ve formátu JSON a CSV, aby mohly být později zpracovány pomocí vědeckých balíčků jazyka Python. Framework byl unit testován před provedením experimentálního vyhodnocení. Pro experimenty byly použity minutové svíčky 10 různých kryptoměn. Nejprve byl vybrán vyhledávací prostor s rozumnými konfiguracemi a velikostí. Nejlepší konfigurace byly nalezeny pomocí algoritmu hrubé síly. Následně byly provedeny white-box a black-box testy pomocí heuristických přístupů a výsledky porovnány s optimálními. Heuristické přístupy jsou schopny najít téměř optimální konfigurace během několika minut namísto hodin nebo dokonce dnů pomocí i nejoptimalizovanějšího algoritmu hrubé síly. | cze |
dc.description.abstract | The aim of the thesis is to find a near optimal configuration for an algorithmic trading strategy using heuristics in reasonably short time. The reader is firstly introduced to complexity classes and heuristic methods, including those used in the practical part: simulated annealing, genetic algorithm and tabu search. It is followed by the description of algorithmic trading and the stages that can be automated. Knowledge from both of these fields is combined in the backtesting section. The goal of backtesting is to test a trading strategy against historical data to make adjustments and find appropriate configuration before deciding whether or not to use it in real-time trading. Finding these configurations is an NP-hard problem, and heuristics can be used to find the optimal ones in a reasonable time. In order to achieve greater flexibility and speed, a custom framework written in C++20 was created. The historical simulation was inspired by the TradingView platform and the trading process by the Binance exchange. Modern C++ features such as concepts and coroutines were used. The emphasis was placed on the effective use of the language features and computer resources. In addition to heuristics, a brute force algorithm was also implemented. It was parallelized using OpenMP to achieve higher speed. Heuristics were implemented to be flexible and easy to use, thus design patterns such as Observer and Strategy were used. The progress and results collected during the optimization were saved in JSON and CSV files, so that they can later be examined using scientific Python packages. The framework was unit tested before the experimental evolution was performed. Years of one-minute candlestick data of 10 different cryptocurrencies were used for the evaluation. First, a search space with reasonable configurations and size was selected. The best configurations were found using a brute force algorithm. White-box tests and black-box tests were then performed using heuristic approaches, and the results were compared with the optimal ones. Overall, heuristic approaches are able to find near-optimal configurations in minutes instead of hours or even days using even the most optimized brute-force algorithm. | eng |
dc.publisher | České vysoké učení technické v Praze. Vypočetní a informační centrum. | cze |
dc.publisher | Czech Technical University in Prague. Computing and Information Centre. | eng |
dc.rights | A university thesis is a work protected by the Copyright Act. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one?s own expense. The use of thesis should be in compliance with the Copyright Act http://www.mkcr.cz/assets/autorske-pravo/01-3982006.pdf and the citation ethics http://knihovny.cvut.cz/vychova/vskp.html | eng |
dc.rights | Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem http://www.mkcr.cz/assets/autorske-pravo/01-3982006.pdf a citační etikou http://knihovny.cvut.cz/vychova/vskp.html | cze |
dc.subject | zpětné testování | cze |
dc.subject | optimalizace | cze |
dc.subject | metaheuristiky | cze |
dc.subject | algoritmické obchodování | cze |
dc.subject | backtesting | eng |
dc.subject | optimization | eng |
dc.subject | metaheuristics | eng |
dc.subject | algorithmic trading | eng |
dc.title | Heuristické přístupy při řešení NP-těžkých úloh | cze |
dc.title | Heuristic approaches in solving NP-hard problems | eng |
dc.type | diplomová práce | cze |
dc.type | master thesis | eng |
dc.contributor.referee | Trdlička Jan | |
theses.degree.discipline | Softwarové inženýrství | cze |
theses.degree.grantor | katedra softwarového inženýrství | cze |
theses.degree.programme | Informatika | cze |
Soubory tohoto záznamu
Tento záznam se objevuje v následujících kolekcích
-
Diplomové práce - 18102 [1005]