当前位置:网站首页>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 .
边栏推荐
- The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities
- How can we make an annual income of onemillion yuan by making our own media video?
- Uncover gaussdb (for redis): comprehensive comparison of CODIS
- R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
- 【OceanBase】OceanBase简介及其与MySQL的比较
- Web project development process
- Hook技术
- What is principal component analysis? Dimension reduction of classical case analysis variables
- R language dplyr package filter function filters the data rows in the specified list whose contents in the dataframe data are not (not equal to one of the specified vectors)
- 20. MVVM command binding of WPF
猜你喜欢

Windows下MySQL的安装和删除

Continue to cut the picture after the ArcGIS Server is disconnected

Develop two modes of BS mode verification code with VFP to make your website more secure

19. Implementation of MVVM architecture based on WPF event to command

使用php脚本查看已开启的扩展

Dark horse shopping mall ---3 Commodity management
![[regression analysis] understand ridge regression with case teaching](/img/95/91f6f2a018b8d320945b12562492eb.jpg)
[regression analysis] understand ridge regression with case teaching

19、wpf之事件转命令实现MVVM架构

Architects reveal the difference between working in Alibaba, Tencent and meituan
![[oceanbase] Introduction to oceanbase and its comparison with MySQL](/img/1c/bd2bcddb7af4647407d2bc351f5f5d.png)
[oceanbase] Introduction to oceanbase and its comparison with MySQL
随机推荐
Le détour d'un ingénieur en matériel
VFP function to summarize all numeric columns of grid to cursor
Web project development process
Cesium building loading (with height)
Hook技术
How to use ARIMA model for prediction?
R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
WebRTC Native M96 基础Base模块介绍之实用方法的封装(MD5、Base64、时间、随机数)
R language dplyr package filter function filters the data rows in the specified list whose contents in the dataframe data are not (not equal to one of the specified vectors)
一款好用的印章设计工具 --(可转为ofd文件)
Recyclerview scrolls to the specified location
PD1.4转HDMI2.0转接线拆解。
Uncover gaussdb (for redis): comprehensive comparison of CODIS
Mui scroll bar recovery
R语言使用构建有序多分类逻辑回归模型、epiDisplay包的ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)
ROS notes (06) - definition and use of topic messages
黑马畅购商城---8.微服务网关Gateway和Jwt令牌
How to open an account for trading futures Shanghai nickel products online
Oracle Spatial creating spatial tables
ArcGIS services query filter by time field