Giter Club home page Giter Club logo

nkaz001 / algotrading-example Goto Github PK

View Code? Open in Web Editor NEW
267.0 267.0 95.0 27.03 MB

algorithmic trading backtest and optimization examples using order book imbalances. (bitcoin, cryptocurrency, bitmex, binance futures, market making)

Jupyter Notebook 100.00%
algo-trading algo-trading-strategies algorithm-trading algorithmic-trading-backtests algotrading algotrading-resources binance-bot binance-futures binance-trading-bot bitcoin-trading bitcoin-trading-bot bitmex-bot cryptocurrency-trading cryptocurrency-trading-strategies orderbook orderbook-imbalance trading trading-algorithms trading-bot trading-strategies

algotrading-example's People

Contributors

nkaz001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

algotrading-example's Issues

Max pos size and equity

Hi I like your works but can not understand the return with equity and max_position, how do you calculate the leverage and balance you need ?

Great project!

Hi, I just stumbled upon your project - any way to contact you for testing or other forms of collaboration?

Freqtrade

Hay bro. Thanks for this amazing project.
I have struggled to combine your binance startegy with freqtrade to make it automated. But it is not working and everytime it throughs this error

(.env) ubuntu@ip-172-26-10-203:~/freqtrade$ freqtrade backtesting --config config.json --strategy custom_strategy --timerange 20230401-20230512
2023-05-13 07:57:10,313 - freqtrade - INFO - freqtrade 2023.5.dev-ad2080ab3
2023-05-13 07:57:10,315 - freqtrade.configuration.load_config - INFO - Using config: config.json ...
2023-05-13 07:57:10,316 - freqtrade.loggers - INFO - Verbosity set to 0
2023-05-13 07:57:10,317 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 3 ...
2023-05-13 07:57:10,317 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20230401-20230512 ...
2023-05-13 07:57:10,317 - freqtrade.configuration.configuration - INFO - Using user-data directory: /home/ubuntu/freqtrade/user_data ...
2023-05-13 07:57:10,317 - freqtrade.configuration.configuration - INFO - Using data directory: /home/ubuntu/freqtrade/user_data/data/binance ...
2023-05-13 07:57:10,318 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ...
2023-05-13 07:57:10,318 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20230401-20230512
2023-05-13 07:57:10,318 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
2023-05-13 07:57:10,325 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2023-05-13 07:57:10,325 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2023-05-13 07:57:10,325 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2023-05-13 07:57:10,330 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
2023-05-13 07:57:10,330 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2023-05-13 07:57:10,330 - freqtrade.exchange.exchange - INFO - Using CCXT 3.0.97
2023-05-13 07:57:10,330 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2023-05-13 07:57:10,337 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2023-05-13 07:57:10,344 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2023-05-13 07:57:15,389 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
Add {
        "method": "AgeFilter",
        "min_days_listed": 30
},
 to your pairlists in config (Under StaticPairList)
2023-05-13 07:57:15,410 - freqtrade.resolvers.iresolver - WARNING - Path "/home/ubuntu/freqtrade/user_data/strategies" does not exist.
2023-05-13 07:57:15,410 - freqtrade - ERROR - Impossible to load Strategy 'custom_strategy'. This class does not exist or contains Python code errors.

Please help??

Trading Fees in Backtest.

How are trading fees calculated in your backtests?

When trades are closed, is it through a market order or limit? If limit, is there some sort of stop-loss in place?

Thanks.

data source

Hi,

I was just trying to replicate your scripts crypto-scratch whose make use of data from tardis. I was able to download the sample data from this data provider but it appears to be not enough data to perform the entire analysis (in-out of sample periods).

I was wondering which data you are reading with the following command (e.g. xbtusd-normalization-market-making-backtest-hedge.ipynb ) :

df = pd.read_pickle('data2')

imbalace or trades? That you saved in a pickle object in the notebook : tardis-process.ipynb

Did you subscribe to tardis for additional data? what subscription plan would do the job (retrieving enough data to run your notebooks).

Any advice/recommendation is welcome. Thank you in advance. BTW nice job!
Jean-Fabrice

contact you

how can i contact you i have some questions about your project ?

Quote mid price calculation

Can you explain how you calculate the new_bid and new_ask? What I don't get is how you compute the quote_mid_price. Does A stands for the quoted position?

Thank you in advance for your response.

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.