quantitative 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/quant/ticks/ohlc.rb +5 -2
- data/lib/quant/ticks/spot.rb +6 -2
- data/lib/quant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3d3c818bd142e017de0c61523ac0dfb14ec104fab94e073336892829128d87a
|
|
4
|
+
data.tar.gz: 642e8f7c285556847597a4a046443144d9a2fc394448af6ed95fc6d34f90dfd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db5a09bfe7dab83b4697726e1ea52a487231c02b3d57498c5a7a6e8cc152b3baf80c701cc7c01cd5a20732746f5be6d17dfe9d5425a1396f2a08adaba3e091a4
|
|
7
|
+
data.tar.gz: 566493343ff4c6986573072b5c6309c4ad3088b13b2c1b518d9cd6cae60d81c4c081bb60dfde54f684e245c347586c1a5ed1efa2b6f5c30708c39d61a278e8bc
|
data/Gemfile.lock
CHANGED
data/lib/quant/ticks/ohlc.rb
CHANGED
|
@@ -45,8 +45,11 @@ module Quant
|
|
|
45
45
|
@low_price = low_price.to_f
|
|
46
46
|
@close_price = close_price.to_f
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
# Volumes are floats, not ints — crypto markets and many futures markets express
|
|
49
|
+
# fractional base/target volumes routinely (e.g., 0.12345 BTC). Existing specs already
|
|
50
|
+
# asserted Float values (`eq(2.0)`); a prior `.to_i` regression silently truncated.
|
|
51
|
+
@base_volume = (volume || base_volume).to_f
|
|
52
|
+
@target_volume = (target_volume || @base_volume).to_f
|
|
50
53
|
@trades = trades.to_i
|
|
51
54
|
|
|
52
55
|
@green = green.nil? ? compute_green : green
|
data/lib/quant/ticks/spot.rb
CHANGED
|
@@ -39,8 +39,12 @@ module Quant
|
|
|
39
39
|
@close_timestamp = extract_time(timestamp || close_timestamp || Quant.current_time)
|
|
40
40
|
@open_timestamp = @close_timestamp
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
# Volumes are floats, not ints — crypto markets and many futures markets express
|
|
43
|
+
# fractional base/target volumes routinely (e.g., 0.12345 BTC). Existing specs already
|
|
44
|
+
# asserted Float values (`eq(2.0)`); a prior `.to_i` regression silently truncated.
|
|
45
|
+
# See OHLC for the same fix.
|
|
46
|
+
@base_volume = (volume || base_volume).to_f
|
|
47
|
+
@target_volume = (target_volume || @base_volume).to_f
|
|
44
48
|
|
|
45
49
|
@trades = trades.to_i
|
|
46
50
|
super()
|
data/lib/quant/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quantitative
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Lang
|
|
@@ -155,7 +155,7 @@ metadata:
|
|
|
155
155
|
allowed_push_host: https://rubygems.org
|
|
156
156
|
homepage_uri: https://github.com/mwlang/quantitative
|
|
157
157
|
source_code_uri: https://github.com/mwlang/quantitative
|
|
158
|
-
changelog_uri: https://github.com/mwlang/quantitative
|
|
158
|
+
changelog_uri: https://github.com/mwlang/quantitative/blob/main/CHANGELOG.md
|
|
159
159
|
rdoc_options: []
|
|
160
160
|
require_paths:
|
|
161
161
|
- lib
|