StockPriceImitation
Stock price movement imitation generator. It is generate by random number.
Installation
Add this line to your application's Gemfile:
gem 'stock_price_imitation'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stock_price_imitation
Usage
require 'stock_price_imitation'
step = 100
first_seed_price = 10000
StockPriceImitation::Generator.new(step, first_seed_price).execute
#=>
# [
# {:opening_price=>4159.493944357897, :closing_price=>4569.307745093309, :low_price=>3505.808433389255, :high_price=>5912.357228503945},
# {:opening_price=>3541.7376008768974, :closing_price=>3887.9262834566866, :low_price=>3328.361828447127, :high_price=>5535.742136147374},
# {:opening_price=>9048.18367848711, :closing_price=>8573.694158336206, :low_price=>8082.212918461541, :high_price=>9735.473910738032},
# {:opening_price=>5117.8471523358085, :closing_price=>7558.560742729045, :low_price=>3466.6265172827384, :high_price=>8218.548256191063},
# ...
# ]