Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Technology to support fairy breeding as a 24/36...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Technology to support fairy breeding as a 24/365 money game

Avatar for Satoshi SUZUKI

Satoshi SUZUKI

June 22, 2023

Other Decks in Programming

Transcript

  1. Technology to support fairy breeding as a 24/365 money game

    player Satoshi SUZUKI Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 1
  2. Introducing myself » Satoshi SUZUKI » Software engineer » Engineering

    manager » Tw: @studio3104 » Bs: @studio3104.com Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 2
  3. Let's get the ball rolling! Event hashtag » #ourdevday2023 Technology

    to support fairy breeding as a 24/365 money game player @ #ourdevday2023 3
  4. Wouldn't it be great if you could make a lot

    of money just by sleeping around? Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 4
  5. In this session... » The conclusion I came to after

    thinking about how to make money without doing anything » Prerequisite knowledge to realize the idea » Overview of the methodology actually implemented and operated » How it turned out as a result Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 5
  6. How we breed the fairy Technology to support fairy breeding

    as a 24/365 money game player @ #ourdevday2023 6
  7. Adopted idea » Cryptocurrency forex » Trade by identifying speculation

    with logic that is fully automated by software Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 7
  8. Why cryptocurrency? » Exchanges operate 24 hours a day in

    principle » However, regular and irregular maintenance is performed » Fully operable APIs for accounts are exposed Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 8
  9. What's FX? » FX stands for Foreign eXchange » Foreign

    exchange margin trading » A financial instrument that aims to profit from exchange gains when buying and selling foreign currencies Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 9
  10. A principle for winning at FX » Ensure steady and

    faithful execution of the trading rules you set for yourself » Trading volume » Frequency » Conditions to entry/exit » And so on Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 10
  11. Architecture and software design Technology to support fairy breeding as

    a 24/365 money game player @ #ourdevday2023 11
  12. Type of software Software that performs automated trading is generally

    called “Bot", not "Fairy" » Machine learning based » Logic to simulate analysis performed by humans Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 12
  13. Analysis methodology » Chart technical analysis » Statistical methods with

    reference to past market trends » Fundamentals analysis » Depends on fundamental economic conditions » Economic growth rate, inflation, employment statistics, important state-sponsored remarks, and so on Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 13
  14. The simplest technical analysis A golden cross indicating with SMA

    Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 14
  15. Software implementation policy » Implement logics to simulate analysis performed

    by humans » Technical analysis based » Adopt Python » Extensive libraries of arithmetic, analysis, and machine learning » On Amazon Web Services » Actually, any platform is fine as long as containers and databases can be handled easily Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 15
  16. Where to start » Prepare historical data to simulate logics

    before actual trading » Refer to it in actual transactions » Few exchanges publish historical data » Even if they were public, there is often little variation in the time frame Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 16
  17. Data manipulating strategy » Fetching ticker from WebSocket API continuously

    » Round to each time frame required » Convert to OHLC format for easy handling in logic Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 17
  18. OHLC OHLC stands for Open, High, Low, and Close data

    = { 'Open': open_value, 'High': high_value, 'Low': low_value, 'Close': close_value, 'Volume': volume, } data_frame = pandas.DataFrame(data, index=period) data_frame.index.name = 'Date' Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 18
  19. Architecture The sequence of processes is a little more complicated

    in actual operation » Ticker Collector performs: » Collecting tickers from the WebSocket API » Covert the tickers to OHLC » Storing OHLC into DynamoDB Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 19
  20. Storing OHLC into DynamoDB class ChartTable(Model): class Meta: table_name =

    os.environ.get('DDB_TABLE_NAME', 'Chart') region = os.environ.get('AWS_REGION', 'ap-northeast-1') billing_mode = 'PAY_PER_REQUEST' period_from = UTCDateTimeAttribute(range_key=True) chart_type = _EnumAttribute(ChartType, hash_key=True) open_value = NumberAttribute() high_value = NumberAttribute() low_value = NumberAttribute() close_value = NumberAttribute() volume = NumberAttribute() open_timestamp = UTCDateTimeAttribute() close_timestamp = UTCDateTimeAttribute() ttl = TTLAttribute(default=datetime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=timezone.utc)) Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 20
  21. Architecture The sequence of processes is a little more complicated

    in actual operation » Laptop refers to OHLC stored in DDB to: » Test various logics » Plot graphs » And so on Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 21
  22. Plotting a graph Just input a data frame with OHLC

    and Volume as it is and it will draw a chart import mplfinance mplfinance.plot(df, **{ 'title': chart_type_name, 'type': 'candle', 'volume': True, 'show_nontrading': True, }) Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 22
  23. Architecture The sequence of processes is a little more complicated

    in actual operation » Trader performs: » Basically same stuff as Ticker Collector » Analyzing the data » Making an order according to the result Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 23
  24. Analyzing chart Just input a data frame with OHLC and

    Volume as it is and it will calculate import talib upper, middle, lower = talib.BBANDS( df, # Uses close price by default timeperiod=duration, nbdevup=sigma_up, nbdevdn=sigma_down, matype=talib.MA_Type.SMA, ) Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 24
  25. Then, how did it turn out as a result? Technology

    to support fairy breeding as a 24/365 money game player @ #ourdevday2023 25
  26. Fairies can also be demons at times Technology to support

    fairy breeding as a 24/365 money game player @ #ourdevday2023 26
  27. Conclusion » Nobody can make a lot of money doing

    nothing » Each method of analysis for price forecasting has its own strengths and weaknesses » It is difficult to keep winning without regular maintenance of logic according to market conditions and operating performance » The same would be true for machine learning models Technology to support fairy breeding as a 24/365 money game player @ #ourdevday2023 27
  28. Just work hard Technology to support fairy breeding as a

    24/365 money game player @ #ourdevday2023 28