Conference Paper ID #1570854831

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

TRADING SIMULATION USING PYTHON AND

VISUALIZATION ON STREAMLIT WITH


MACHINE LEARNING DECISION TREE

Name : Sulistiyono
NIM : 41418310019
Advisor :
Imelda Uli Vistalina S, S.T.,M.T

Electrical Engineering
Engineering Faculty
TRADING SIMULATION USING PYTHON AND VISUALIZATION ON
STREAMLIT WITH MACHINE LEARNING DECISION TREE

Introduction 1

Basic Theory 2

Method 3

Result and Discussion 4

Conclusion 5
Series1
Introduction Previous Research
Background
Invest & trading Trading simulation by backtesting
with machine learning

Technical Indicator: parabolic SAR


Amount of stock & Crypto Investors
In Indonesia (Feb’22)
Machine learning: decision tree

Python web

Source: Bappeti, KSEI (2022) Problem Discussion

1. Compare profit trading simulation between


Keypoints: without machine learning & use machine
learning
Trading Object Method analysis

2. System accuration of machine learning


Trading method Media
Machine
learning 3. Time spend of training and testing data
Basic Theory
A. Stock & B. Technical
Cryptocurrency
Shares signify ownership of a person Cryptocurrency is a digital currency Indicators
Support Resistance, Moving Average, Moving
or business entity in a company or built using blockchain technology Average Convergence Divergence (MACD),
limited liability company Relative Strength index (RSI), Parabollic SAR,
Bollinger Bands, Fibonaci Retracement

C. Python
2.6
Basic Theory
D. Machine Learning E. Split Validation F. Confussion Matrix
Actual Value
Predicted
Value
True (+) False (-)
True Positive False Positive
True (+) (TP) (FP)
True Negative True Negative
NoFalse (-)
Value Accuracy(FN) (TN)
Category
1 0.90 - 1.00 Excellent
2 0.80 - 0.90 good
3 0.70 - 0.80 Fair
4 0.60 - 0.70 Poor
5 0.50 - 0.60 Failure

G. Decision Tree
PERANCANGAN
SISTEM
System Achitecture Design Interface

Flowchart System
A

A
Result & Discussion
A. Trade Testing without Machine learning
To investigate:
Method:
a. Trade performance Simulation interval 1D in last
Data
b. Result trading simulation Training
300 days (Apr'21 – May '22).

Trade Performance Result Trade Result


BBCA ADRO UNVR
Amount Average The final
Name Win Rate Trade Profit/Loss result % Profit /Loss

BBCA 32,00% 23 4,56 10730,00 7,3%


ADRO 33,30% 22 48,63 11070,00 10,7%
UNVR 50,00% 30 212,67 16380,00 63,8%
BTC-USD 32,00% 24 -377,65 936,00 -90,6%
BTC-USD ETH-USD BNB-USD ETH-USD 33,30% 20 22,99 10459,00 4,6%
BNB-USD 28,60% 19 -12,98 9814,00 -1,9%

All result  loss -1%


Stock  profit 27,3%,
cryptocurrency  loss -29,3%

winrate result 36,1%, all result loss -1%


Result & Discussion
B. Trade Testing with Machine learning
To investigate: Method: Data Testing
Simulation interval 1D in last
Data Testing
a. Trade performance
b. Result trading simulation 300 days (Apr'21 – May '22).

Trade Performance Result Trade Result


BBCA ADRO UNVR Amount Average The final
Name Win Rate % Profit/Loss
Trade Profit/Loss result
BBCA 71,4% 7 567,1 13970,0 39,7%
ADRO 100,0% 6 314,1 11885,0 18,9%
UNVR 93,3% 15 917,3 23760,0 137,6%
BTC-USD 100,0% 8 15729,3 135834,0 158,3%
BTC-USD ETH-USD BNB-USD ETH-USD 100,0% 6 1293,4 17760,0 77,6%
BNB-USD 100,0% 4 193,7 10775,0 7,8%

All Result  profit 256%


Stock  profit 65,4%,
cryptocurrency  profit 447,9%

Average winrate 100%, average profit 256%


Result & Discussion
C. Accuracy Test of Machine learning D. Data Processing Time Test
Split validation a. Split 9:1 (90% data training, 10% data testing) Testing data processing time is needed to determine how much time
b. Split 7:3 (70% data training, 30% data testing) the system needs to process and prepare simulation results.
c. Split 5:5 (50% data training, 50% data testing)

Result of accuracy testing Result

No Item Name Training Data Testing Data


Simbol 300d 200d 100d 300d 200d 100d
1 bbca.jk 17,45 15,88 13,04 8,72 5,89 5,36
2 adro.jk 15,49 14,47 14,2 8,62 6,25 6,08
3 unvr.jk 20,62 18,89 11,45 9,33 7,35 5,78
4 btc-usd 16,66 13,62 9,83 9,69 6,82 5,86
5 eth-usd 18,98 14,75 11,9 7,92 7,08 6,52
6 bnb-usd 39,97 17,51 16,87 15,2 8,77 9,15
Split Average Accuracy Average 21,53 15,85 12,88 9,91 7,03 6,46
The higher the percentage of
9:1 98,9%
training data, the greater the
7:3 95,9% The time required for data testing is two times faster than the
accuracy value.
5:5 95,6% time required for data training. More data that is processed,
The range of accuracy values c
the longer the processing time (training and testing).
includes in the excellent
classification category.
Result & Discussion
E. Comparison with previous Research
Reference Methode Merit Demerit

(F. R. Setiawan, Support Vector Machine can predict forecast Accuration of prediction is
2018) (SVM) price low (52%)

Artificial Neural Network average accuration No detail of simulation


(Putu et al., 2021) ( ANN ) 70% (profit/loss)

Maximize predict in No detail of accuration


(Dharmawan, Recurrent different market value, and profit/loss
2020) Reinforcement Learning condition simulation

Fuzzy Rule-Based
(Prasetijo et al., Evidential Reasoning and No detail of accuration
2018) FCM Profit result 83.8% value BBCA ADRO UNVR

Accuration average Just use Parabolic SAR


96,4%, profit result indicator, not real time
(Sulistiyono, 2022) decision tree average 171% simulation yet
depth= 7 depth= 5 depth= 9
BTC-USD ETH-USD BNB-USD

The result of this research, had highest accuracy, highest profit. But, the system still anomaly and follow market trend
Conclussion 5

1 Simulation result system without machine learning: average winrate 36,1%, loss-
1%

2 Simulation result system with machine learning: winrate 100% average profit
256%

3 The range of accuracy values includes in the excellent classification category.

4 Number of data will depend into speed of data processing

You might also like