{"repo":"mchiuminatto/triple_barrier","free":true,"listed":false,"github":"https://github.com/mchiuminatto/triple_barrier","clone":"git clone https://github.com/mchiuminatto/triple_barrier.git","description":"Semi vectorized trades labeler for back-testing and machine learning pipelines","language":"Python","stars":13,"topics":["algorithmic-trading","labeler"],"license":"MIT","category":"trading","readme_excerpt":"WARNING: This library has not been tested for real trading yet, test it first for your traind style and instruments and strategies. Overview Triple Barrier is a trade labeler that can be used for algorithmic trading back-testing or machine learning training and validating pipelines. It records for each trade when, at what price level and why a position was closed. It includes features to plot the triple for a particular trade and the closing event: Other features: - Built upon pandas, numpy, matplotlib mplfinance. - It can be used to label single trades or semi vectorized, meaning that can be used with a pandas apply function. Why? This project emerges from a repeated trading strategy back-testing process where I was caught again and again copying and pasting from previous pipelines the code to perform a vectorized (semi-vectorized to be more accurate) labeling of trades. To avoid this DRY (Do not Repeat Yourself) routine, that is why I decided to move this code to a library. Before moving further into the library details a little bit of context. Trading Strategies A trading strategy describes the logic for opening, managing and closing positions. Depending on the trading strategy, once a position is opened, four events can determine how the position ends: 1. Stop loss hit: The price hit the stop loss, which is the maximum tolerable loss (Limit Order) 2. Take profit hit: The price hit the take profit, which is the estimated maximum profit the position can reach (Limit Order) ","default_branch":null,"files":null,"tree":[],"storefront":"/r/mchiuminatto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mchiuminatto/triple_barrier/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}