Sha256: 95fcb04690031fca5c0f0185e7f1970d133bf2ebd2d152786d1bbf442774fe8d

Contents?: true

Size: 232 Bytes

Versions: 19

Compression:

Stored size: 232 Bytes

Contents

# lib/sqa/strategry/random.rb

require_relative 'common'

class SQA::Strategy::Random
	extend SQA::Strategy::Common

	def self.trade(vector)
		case rand(9)
		when (0..2)
			:buy
		when (3..5)
			:sell
		else
			:hold
		end
	end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
sqa-0.0.24 lib/sqa/strategy/random.rb
sqa-0.0.22 lib/sqa/strategy/random.rb
sqa-0.0.21 lib/sqa/strategy/random.rb
sqa-0.0.20 lib/sqa/strategy/random.rb
sqa-0.0.19 lib/sqa/strategy/random.rb
sqa-0.0.18 lib/sqa/strategy/random.rb
sqa-0.0.17 lib/sqa/strategy/random.rb
sqa-0.0.15 lib/sqa/strategy/random.rb
sqa-0.0.14 lib/sqa/strategy/random.rb
sqa-0.0.13 lib/sqa/strategy/random.rb
sqa-0.0.12 lib/sqa/strategy/random.rb
sqa-0.0.11 lib/sqa/strategy/random.rb
sqa-0.0.10 lib/sqa/strategy/random.rb
sqa-0.0.9 lib/sqa/strategy/random.rb
sqa-0.0.8 lib/sqa/strategy/random.rb
sqa-0.0.7 lib/sqa/strategy/random.rb
sqa-0.0.6 lib/sqa/strategy/random.rb
sqa-0.0.5 lib/sqa/strategy/random.rb
sqa-0.0.4 lib/sqa/strategy/random.rb