简体   繁体   English

使用R中的模拟从OHLC生成刻度数据

[英]generating tick data from OHLC using simulations in R

I have a project where I have been asked to use OHLC stock price data to simulate tick data (hourly or minute frequency is my choice) using random number generators and simulation in R. My constraint is that the data should be bound by the Low and High during the day. 我有一个项目,我被要求使用OHLC股票价格数据模拟刻度数据(小时或分钟频率是我的选择)使用R中的随机数生成器和模拟。我的约束是数据应该由低和白天很高。 Which function in R can I use for starting such a project.. I can post code here as I make progress - any suggestions would be very helpful 我可以使用R中的哪个函数来启动这样的项目..我可以在此处发布代码,因为我取得了进展 - 任何建议都会非常有用

Here is an example using a uniform distribution. 以下是使用均匀分布的示例。

runif(NUMSAMP, min=LOW, max=HIGH)

Look at ?distribution for ideas on others. 看看?分发他人的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM