Please use this identifier to cite or link to this item:
https://hdl.handle.net/2445/223569
Full metadata record
DC Field | Value | Language |
---|---|---|
dc.contributor.advisor | Urruticoechea, Eduardo | - |
dc.contributor.author | Cabrera Marin, Marc | - |
dc.date.accessioned | 2025-10-09T10:37:59Z | - |
dc.date.available | 2025-10-09T10:37:59Z | - |
dc.date.issued | 2025-06-10 | - |
dc.identifier.uri | https://hdl.handle.net/2445/223569 | - |
dc.description | Treballs Finals de Grau d'Enginyeria Informàtica, Facultat de Matemàtiques, Universitat de Barcelona, Any: 2025, Director: Eduardo Urruticoechea | ca |
dc.description.abstract | Este trabajo detalla el desarrollo de un bot de trading de criptomonedas basado en análisis técnico. El bot interactúa con los exchanges Binance [1] y Bitfinex [2], utilizando la biblioteca CCXT para la conectividad con Binance y la funcionalidad de paper trading de Bitfinex para simulación con interfaz gráfica. Las funcionalidades clave incluyen una interfaz gráfica de usuario, registro de logs, gestión de transacciones, operaciones básicas de compra/venta, órdenes stop-loss y take-profit, seguimiento del PnL global y por estrategia, y gráficos de velas con doble media móvil simple (SMA). El bot opera principalmente con los pares ETH/BTC y USD-T/USD, empleando una estrategia de cruce de SMAs [3] para identificar tendencias alcistas o bajistas y automatizar las decisiones de trading, buscando maximizar la rentabilidad gestionando el riesgo. La arquitectura del sistema está compuesta por múltiples módulos especializados que garantizan la modularidad y mantenibilidad del código. El módulo principal (‘main.py‘) actúa como controlador central y gestiona la interfaz de usuario moderna desarrollada con Tkinter, mientras que ‘conexion.py‘ se encarga de la comunicación con los distintos exchanges mediante APIs REST. La gestión de la cartera (‘cartera.py‘) proporciona funciones para monitorizar y administrar los activos, mientras que el sistema de transacciones (‘transacciones.py‘) registra y procesa todas las operaciones de compra y venta. La interfaz de usuario presenta un diseño moderno e intuitivo organizado en pestañas que incluye un panel principal con indicadores de estado en tiempo real, una sección de trading con órdenes avanzadas, un portafolio detallado con gráficos de distribución de activos, gestión de estrategias automatizadas y un historial completo de transacciones. El sistema incorpora indicadores visuales de estado que muestran la conectividad con los exchanges, el saldo disponible, el par seleccionado y el estado general del bot. El motor de estrategias implementa algoritmos de cruce de medias móviles con periodos configurables, ermitiendo la detección automática de señales de entrada y salida. La funcionalidad de stop-loss y take-profit proporciona gestión automatizada del riesgo, mientras que el sistema PnL (‘pnltracker.py‘) calcula y monitoriza los beneficios y pérdidas tanto a nivel global como por estrategia individual. Las capacidades gráficas (‘chart.py‘) utilizan mplfinance para generar visualizaciones de velas japonesas con indicadores técnicos superpuestos, permitiendo el análisis visual de tendencias y patrones del mercado. El sistema soporta múltiples marcos temporales desde 1 minuto hasta 1 día, adaptándose a diferentes estilos de trading. La implementación incorpora mecanismos robustos de gestión de errores y un sistema de logging extensivo para facilitar la depuración y monitorización del sistema. El bot está diseñado para operar de manera autónoma con supervisión mínima, ejecutando estrategias predefinidas y notificando al usuario sobre eventos importantes. La aplicación representa una solución completa para traders que buscan automatizar sus estrategias de trading en criptomonedas, combinando la potencia del análisis técnico con una interfaz accesible y funcionalidades avanzadas de gestión de riesgos. | ca |
dc.description.abstract | This work details the development of a cryptocurrency trading bot based on technical analysis. The bot interacts with the Binance [1] and Bitfinex [2] exchanges, using the CCXT library for connectivity with Binance and Bitfinex’s paper trading functionality for simulation with a graphical interface. Key features include a graphical user interface, log recording, transaction management, basic buy/sell operations, stop-loss and take-profit orders, tracking of global and per-strategy PnL, and candlestick charts with a double simple moving average (SMA). The bot mainly operates with the ETH/BTC and USDT/USD pairs, employing an SMA crossover strategy [3] to identify bullish or bearish trends and automate trading decisions, aiming to maximize profitability while managing risk. The system architecture is composed of multiple specialized modules that ensure code modularity and maintainability. The main module (‘main.py‘) acts as the central controller and manages the modern user interface developed with Tkinter, while ‘conexion.py‘ handles communication with the different exchanges via REST APIs. Portfolio management (‘cartera.py‘) provides functions to monitor and manage assets, while the transaction system (‘transacciones.py‘) logs and processes all buy and sell operations. The user interface features a modern and intuitive design organized into tabs, including a main dashboard with real-time status indicators, a trading section with advanced orders, a detailed portfolio with asset distribution charts, automated strategy management, and a full transaction history. The system incorporates visual status indicators showing exchange connectivity, available balance, selected trading pair, and the bot’s overall status. The strategy engine implements moving average crossover algorithms with configurable periods, enabling automatic detection of entry and exit signals. The stop-loss and take-profit functionalities provide automated risk management, while the PnL system (‘pnltracker.py‘) calculates and monitors profits and losses both globally and per individual strategy. The charting capabilities (‘chart.py‘) use mplfinance to generate Japanese candlestick visualizations with overlaid technical indicators, enabling visual analysis of market trends and patterns. The system supports multiple timeframes from 1 minute to 1 day, adapting to different trading styles. The implementation includes robust error-handling mechanisms and extensive logging to facilitate debugging and system monitoring. The bot is designed to operate autonomously with minimal supervision, executing predefined strategies and notifying the user of significant events. The application represents a complete solution for traders looking to automate their cryptocurrency trading strategies, combining the power of technical analysis with an accessible interface and advanced risk management features. | ca |
dc.format.extent | 51 p. | - |
dc.format.mimetype | application/pdf | - |
dc.language.iso | spa | ca |
dc.rights | memòria: cc-nc-nd (c) Marc Cabrera Marin, 2025 | - |
dc.rights | codi: Apache (c) Marc Cabrera Marin, 2025 | - |
dc.rights.uri | http://creativecommons.org/licenses/by-nc-nd/3.0/es/ | - |
dc.rights.uri | http://www.apache.org/licenses/ | * |
dc.source | Treballs Finals de Grau (TFG) - Enginyeria Informàtica | - |
dc.subject.classification | Bots (Programes d'ordinador) | ca |
dc.subject.classification | Criptomoneda | ca |
dc.subject.classification | Mercat financer | ca |
dc.subject.classification | Programari | ca |
dc.subject.classification | Treballs de fi de grau | ca |
dc.subject.other | Internet bots (Computer software) | en |
dc.subject.other | Cryptocurrencies | en |
dc.subject.other | Financial market | en |
dc.subject.other | Computer software | en |
dc.subject.other | Bachelor's theses | en |
dc.title | Desarrollo de un Bot de Trading de Criptomonedas basado en Análisis Técnico | ca |
dc.type | info:eu-repo/semantics/bachelorThesis | ca |
dc.rights.accessRights | info:eu-repo/semantics/openAccess | ca |
Appears in Collections: | Treballs Finals de Grau (TFG) - Enginyeria Informàtica Programari - Treballs de l'alumnat |
Files in This Item:
File | Description | Size | Format | |
---|---|---|---|---|
TFG_Cabrera_Marin_Marc.pdf | Memòria | 2.93 MB | Adobe PDF | View/Open |
codi.zip | Codi font | 1.39 MB | zip | View/Open |
This item is licensed under a
Creative Commons License