Coder Social home page Coder Social logo

riska's Introduction

RISKA

Authors

Project Overview

This code is a simple trading bot that uses an agent-based approach to trade on financial markets. The bot is written in Python and uses the following libraries:

  • pandas
  • json
  • binance

The bot uses a set of technical indicators to make buy and sell decisions, and it is trained on historical data. The bot tries to maximize its profit while minimizing its risk.

Getting Started

To use the trading bot, you need to run the riska.py script. Before running the script, you need to make sure that you have the necessary libraries installed. You can install the libraries using pip:

    pip install pandas
    pip install python-binance

To run the script, use the following command:

    python riska.py

And also save your credentials for the binance api into a json file name credentials.json in the root project folder. With this format:

{
    "api_key": "TOSET",
    "api_secret": "TOSET"
}

The script will train the trading bot on historical data and save the parameters of the best agent in a parameters.json file.

Files

The code consists of three files:

  • riska.py: This file contains the main code for the trading bot. It loads the historical data, trains the agents, and saves the parameters of the best agent.
  • agent.py: This file contains the agent class, which represents an agent that trades on the financial market.
  • get_data.py: This Python file contains functions to retrieve cryptocurrency data from Binance, create a Pandas DataFrame, add technical indicators to the data, and save the resulting DataFrame to a CSV file. The file imports the following modules.

Parameters

The riska.py file contains several parameters that you can adjust to change the behavior of the trading bot:

  • cut: The number of parts to split the data into. The bot will train an agent on each part.
  • cash: The amount of cash that the agent starts with.
  • nb_agents: The number of agents to use in the training process.
  • generation_nb: The number of generations to train the agents.

Disclaimer

This trading bot is provided for educational purposes only. It should not be used for real trading without proper testing and validation. The author of this code is not responsible for any losses that may result from using this trading bot.

riska's People

Contributors

chuklee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.