当前位置:网站首页>2022 meisai topic C idea sharing + translation
2022 meisai topic C idea sharing + translation
2022-06-25 12:20:00 【Halosec_ Wei】
background
Market traders frequently buy and sell volatile assets , The goal is to maximize its total return . There is usually a commission for every transaction . Two such assets are gold and bitcoin .

chart 1: The daily price of gold , Dollars per troy ounce . source : London Bullion Market Association ,2021 year 9 month 11 Japan

chart 2: Bitcoin daily price , US $per bitcoin . source : NASDAQ ,2021 year 9 month 11 Japan
requirement
A trader asked you to develop a model , The model uses only the daily price stream to date to determine the delivery Should I buy... Every day 、 Holding or selling assets in its portfolio
2016 year 9 month 11 Japan , You will come from 1000 The dollar starts . You will use a five-year trading period , from 2016 year 9 month 11 solstice 2021 year 9 month 10 Japan . On every trading day , The trader will have a portfolio of cash , Gold and bitcoin [C, G, B] In US dollars 、 Troy ounce and bitcoin mean . The initial status is [1000, 0, 0]. Every deal ( Buy or sell ) The commission cost of is the transaction amount . hypothesis αgold = 1% and αbitcoin = 2%. There is no cost of holding assets .
Please note that , Bitcoin can be traded every day , But gold is traded only on open market days , Pricing data files reflect LBMA-GOLD.csv and BCHAIN-MKPRU.csv These two points , Your model should consider this trading schedule .
To develop a model , You can only use the data in the two spreadsheets provided :LBMA-GOLD.csv and BCHAIN-MKPRU.csv.( Download it from the official website )
• Develop a model , Only provide the best daily trading strategy based on price data until that day . stay 2021 year 9 month 10 Use your initial 1000 How much is the value of dollar investment model and strategy ?
• Provide evidence that your model provides the best strategy .
• Determine how sensitive the strategy is to transaction costs . How transaction costs affect strategy and outcomes ?
• At most one memo ( Two pages ) Form your strategy 、 Models and results are communicated to traders
Thought analysis
We can predict the future trend of ( Buy or sell or keep ) These three trading activities make decisions .
First , Forecast the price of gold and bitcoin , You can choose to use a variety of machine learning regression .
here , For example, using a sliding window -xgboost To make predictions , Before use 5 Days of price data to predict 1 Sky price .( Take the gold price forecast as an example )
Using tools :SPSSPRO( All functions are free 、 Unlimited times and time )
SPSSPRO- Free professional online data analysis platform
step 1 Upload data

step 2 Null processing


in fact , That is to say, the 10 Data with missing values .
step 3 Process the data , So that the time series can be transformed into pre 5 Days of price data as an independent variable , after 1 Days of price data as a dependent variable .


step 4 Then run xgboost To predict , Incidentally, genetic algorithm is used to estimate the learning rate 、 Regular term parameters for optimization .


Complex model , Long running time , Please be patient !
result


step 5 After making the forecast , We need to get buy - sell - Maintain this trading strategy , among , Gold only trades on the opening day , This means that on weekends or holidays , The trading status must be holding , The common trading day data of gold and bitcoin can be kept separately for analysis . Suppose gold - Bitcoin is bought and sold together , The main design is a time series data such as a rate of return , such as , We can buy on any day , We can use ( Predict the price of gold one day / The actual price of gold -1) To get a yield , When the increase reaches a certain value , Suggest selling .
Be careful : The initial state is 【1000,0,0】, And every transaction ( To buy or sell ) The transaction cost of is... Of the transaction amount a%, The gold is 1%, Bitcoin is 2%, that , about 1000 dollar , There are two steps to buying and selling , The actual transaction amount we have is only 940 dollar .
Establish a simple goal plan : t It is the period from buying to selling

Due to purchase - The sale is ongoing , We need to set up a loop to run .
To achieve a more perfect result , More realistic , Financial risk analysis can be added , similar VaR、CVaR、 Or the use of information entropy , After establishing a perfect investment model , We can use the optimization algorithm to optimize the weight , Such as particle swarm optimization 、 Genetic algorithm (ga) 、 Immune algorithm and so on .
边栏推荐
- PyCaret 成功解决无法从‘sklearn.model_selection._search‘导入名称“_check_param_grid”
- 15. Notes on the button style of WPF
- VFP develops a official account to receive coupons, and users will jump to various target pages after registration, and a set of standard processes will be sent to you
- Actual combat summary of Youpin e-commerce 3.0 micro Service Mall project
- [data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?
- The temporary table from XML to VFP is simple and easy to use and worth collecting
- Windows下MySQL的安装和删除
- MYSQL中对复杂JSON的更新
- Explain factor analysis in simple terms, with case teaching (full)
- 15、wpf之button样式小记
猜你喜欢
![[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?](/img/51/9aceaaeed1f6db7c60685d53477eba.png)
[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?

plt. GCA () picture frame and label

VFP serial port communication is difficult for 9527. Maomao just showed his skill and was defeated by kiss

flutter常用命令及问题

VFP develops a official account to receive coupons, and users will jump to various target pages after registration, and a set of standard processes will be sent to you

Time series analysis - how to use unit root test (ADF) correctly?

优品购电商3.0微服务商城项目实战小结

Uncover gaussdb (for redis): comprehensive comparison of CODIS

Windows下MySQL的安装和删除

A set of automated paperless office system (oa+ approval process) source code: with data dictionary
随机推荐
R language uses the scale function to scale the input data of neural network to the minimum and maximum, scale the data to between 0 and 1, and divide the data set into training set and test set
黑马畅购商城---2.分布式文件存储FastDFS
VFP develops a official account to receive coupons, and users will jump to various target pages after registration, and a set of standard processes will be sent to you
What is principal component analysis? Dimension reduction of classical case analysis variables
2020最新最全IT学习线路
VFP uses Kodak controls to control the scanner to solve the problem that the volume of exported files is too large
Is it safe to open an account and buy stocks? Who knows
Redis雪崩、穿透和击穿是什么?
网络 | traceroute,路由跟踪命令,用于确定 IP 数据包访问目标地址所经过的路径。
Web project development process
15、wpf之button样式小记
Does sklearex make your sklearn machine learning model training fly fast?
What are redis avalanche, penetration and breakdown?
ARM V7 ldr str 内存访问
ArcGIS services query filter by time field
RecyclerView滚动到指定位置
使用php脚本查看已开启的扩展
Network | indicators and test methods to measure the quality of the network
优品购电商3.0微服务商城项目实战小结
Mpai data science platform SVM support vector machine classification \ explanation of regression parameter adjustment