sqa 0.0.24 → 0.0.31
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/.goose/memory/development.txt +3 -0
- data/.semver +6 -0
- data/ARCHITECTURE.md +648 -0
- data/CHANGELOG.md +82 -0
- data/CLAUDE.md +653 -0
- data/COMMITS.md +196 -0
- data/DATAFRAME_ARCHITECTURE_REVIEW.md +421 -0
- data/NEXT-STEPS.md +154 -0
- data/README.md +812 -262
- data/TASKS.md +358 -0
- data/TEST_RESULTS.md +140 -0
- data/TODO.md +42 -0
- data/_notes.txt +25 -0
- data/bin/sqa-console +11 -0
- data/data/talk_talk.json +103284 -0
- data/develop_summary.md +313 -0
- data/docs/advanced/backtesting.md +206 -0
- data/docs/advanced/ensemble.md +68 -0
- data/docs/advanced/fpop.md +153 -0
- data/docs/advanced/index.md +112 -0
- data/docs/advanced/multi-timeframe.md +67 -0
- data/docs/advanced/pattern-matcher.md +75 -0
- data/docs/advanced/portfolio-optimizer.md +79 -0
- data/docs/advanced/portfolio.md +166 -0
- data/docs/advanced/risk-management.md +210 -0
- data/docs/advanced/strategy-generator.md +158 -0
- data/docs/advanced/streaming.md +209 -0
- data/docs/ai_and_ml.md +80 -0
- data/docs/api/dataframe.md +1115 -0
- data/docs/api/index.md +126 -0
- data/docs/assets/css/custom.css +88 -0
- data/docs/assets/js/mathjax.js +18 -0
- data/docs/concepts/index.md +68 -0
- data/docs/contributing/index.md +60 -0
- data/docs/data-sources/index.md +66 -0
- data/docs/data_frame.md +317 -97
- data/docs/factors_that_impact_price.md +26 -0
- data/docs/finviz.md +11 -0
- data/docs/fx_pro_bit.md +25 -0
- data/docs/genetic_programming.md +104 -0
- data/docs/getting-started/index.md +123 -0
- data/docs/getting-started/installation.md +229 -0
- data/docs/getting-started/quick-start.md +244 -0
- data/docs/i_gotta_an_idea.md +22 -0
- data/docs/index.md +163 -0
- data/docs/indicators/index.md +97 -0
- data/docs/indicators.md +110 -24
- data/docs/options.md +8 -0
- data/docs/strategies/bollinger-bands.md +146 -0
- data/docs/strategies/consensus.md +64 -0
- data/docs/strategies/custom.md +310 -0
- data/docs/strategies/ema.md +53 -0
- data/docs/strategies/index.md +92 -0
- data/docs/strategies/kbs.md +164 -0
- data/docs/strategies/macd.md +96 -0
- data/docs/strategies/market-profile.md +54 -0
- data/docs/strategies/mean-reversion.md +58 -0
- data/docs/strategies/rsi.md +95 -0
- data/docs/strategies/sma.md +55 -0
- data/docs/strategies/stochastic.md +63 -0
- data/docs/strategies/volume-breakout.md +54 -0
- data/docs/tags.md +7 -0
- data/docs/true_strength_index.md +46 -0
- data/docs/weighted_moving_average.md +48 -0
- data/examples/README.md +354 -0
- data/examples/advanced_features_example.rb +350 -0
- data/examples/fpop_analysis_example.rb +191 -0
- data/examples/genetic_programming_example.rb +148 -0
- data/examples/kbs_strategy_example.rb +208 -0
- data/examples/pattern_context_example.rb +300 -0
- data/examples/rails_app/Gemfile +34 -0
- data/examples/rails_app/README.md +416 -0
- data/examples/rails_app/app/assets/javascripts/application.js +107 -0
- data/examples/rails_app/app/assets/stylesheets/application.css +659 -0
- data/examples/rails_app/app/controllers/analysis_controller.rb +11 -0
- data/examples/rails_app/app/controllers/api/v1/stocks_controller.rb +227 -0
- data/examples/rails_app/app/controllers/application_controller.rb +22 -0
- data/examples/rails_app/app/controllers/backtest_controller.rb +11 -0
- data/examples/rails_app/app/controllers/dashboard_controller.rb +21 -0
- data/examples/rails_app/app/controllers/portfolio_controller.rb +7 -0
- data/examples/rails_app/app/views/analysis/show.html.erb +209 -0
- data/examples/rails_app/app/views/backtest/show.html.erb +171 -0
- data/examples/rails_app/app/views/dashboard/index.html.erb +118 -0
- data/examples/rails_app/app/views/dashboard/show.html.erb +408 -0
- data/examples/rails_app/app/views/errors/show.html.erb +17 -0
- data/examples/rails_app/app/views/layouts/application.html.erb +60 -0
- data/examples/rails_app/app/views/portfolio/index.html.erb +33 -0
- data/examples/rails_app/bin/rails +6 -0
- data/examples/rails_app/config/application.rb +45 -0
- data/examples/rails_app/config/boot.rb +5 -0
- data/examples/rails_app/config/database.yml +18 -0
- data/examples/rails_app/config/environment.rb +11 -0
- data/examples/rails_app/config/routes.rb +26 -0
- data/examples/rails_app/config.ru +8 -0
- data/examples/realtime_stream_example.rb +274 -0
- data/examples/sinatra_app/Gemfile +22 -0
- data/examples/sinatra_app/QUICKSTART.md +159 -0
- data/examples/sinatra_app/README.md +461 -0
- data/examples/sinatra_app/app.rb +344 -0
- data/examples/sinatra_app/config.ru +5 -0
- data/examples/sinatra_app/public/css/style.css +659 -0
- data/examples/sinatra_app/public/js/app.js +107 -0
- data/examples/sinatra_app/views/analyze.erb +306 -0
- data/examples/sinatra_app/views/backtest.erb +325 -0
- data/examples/sinatra_app/views/dashboard.erb +419 -0
- data/examples/sinatra_app/views/error.erb +58 -0
- data/examples/sinatra_app/views/index.erb +118 -0
- data/examples/sinatra_app/views/layout.erb +61 -0
- data/examples/sinatra_app/views/portfolio.erb +43 -0
- data/examples/strategy_generator_example.rb +346 -0
- data/hsa_portfolio.csv +11 -0
- data/justfile +0 -0
- data/lib/api/alpha_vantage_api.rb +462 -0
- data/lib/sqa/backtest.rb +329 -0
- data/lib/sqa/data_frame/alpha_vantage.rb +43 -65
- data/lib/sqa/data_frame/data.rb +92 -0
- data/lib/sqa/data_frame/yahoo_finance.rb +35 -43
- data/lib/sqa/data_frame.rb +148 -243
- data/lib/sqa/ensemble.rb +359 -0
- data/lib/sqa/fpop.rb +199 -0
- data/lib/sqa/gp.rb +259 -0
- data/lib/sqa/indicator.rb +5 -8
- data/lib/sqa/init.rb +15 -8
- data/lib/sqa/market_regime.rb +240 -0
- data/lib/sqa/multi_timeframe.rb +379 -0
- data/lib/sqa/pattern_matcher.rb +497 -0
- data/lib/sqa/portfolio.rb +260 -6
- data/lib/sqa/portfolio_optimizer.rb +377 -0
- data/lib/sqa/risk_manager.rb +442 -0
- data/lib/sqa/seasonal_analyzer.rb +209 -0
- data/lib/sqa/sector_analyzer.rb +300 -0
- data/lib/sqa/stock.rb +67 -125
- data/lib/sqa/strategy/bollinger_bands.rb +42 -0
- data/lib/sqa/strategy/consensus.rb +5 -2
- data/lib/sqa/strategy/kbs_strategy.rb +470 -0
- data/lib/sqa/strategy/macd.rb +46 -0
- data/lib/sqa/strategy/mp.rb +1 -1
- data/lib/sqa/strategy/stochastic.rb +60 -0
- data/lib/sqa/strategy/volume_breakout.rb +57 -0
- data/lib/sqa/strategy.rb +5 -0
- data/lib/sqa/strategy_generator.rb +947 -0
- data/lib/sqa/stream.rb +361 -0
- data/lib/sqa/version.rb +1 -7
- data/lib/sqa.rb +23 -16
- data/main.just +81 -0
- data/mkdocs.yml +288 -0
- data/trace.log +0 -0
- metadata +261 -51
- data/bin/sqa +0 -6
- data/lib/patches/dry-cli.rb +0 -228
- data/lib/sqa/activity.rb +0 -10
- data/lib/sqa/cli.rb +0 -62
- data/lib/sqa/commands/analysis.rb +0 -309
- data/lib/sqa/commands/base.rb +0 -139
- data/lib/sqa/commands/web.rb +0 -199
- data/lib/sqa/commands.rb +0 -22
- data/lib/sqa/constants.rb +0 -23
- data/lib/sqa/indicator/average_true_range.rb +0 -33
- data/lib/sqa/indicator/bollinger_bands.rb +0 -28
- data/lib/sqa/indicator/candlestick_pattern_recognizer.rb +0 -60
- data/lib/sqa/indicator/donchian_channel.rb +0 -29
- data/lib/sqa/indicator/double_top_bottom_pattern.rb +0 -34
- data/lib/sqa/indicator/elliott_wave_theory.rb +0 -57
- data/lib/sqa/indicator/exponential_moving_average.rb +0 -25
- data/lib/sqa/indicator/exponential_moving_average_trend.rb +0 -36
- data/lib/sqa/indicator/fibonacci_retracement.rb +0 -23
- data/lib/sqa/indicator/head_and_shoulders_pattern.rb +0 -26
- data/lib/sqa/indicator/market_profile.rb +0 -32
- data/lib/sqa/indicator/mean_reversion.rb +0 -37
- data/lib/sqa/indicator/momentum.rb +0 -28
- data/lib/sqa/indicator/moving_average_convergence_divergence.rb +0 -29
- data/lib/sqa/indicator/peaks_and_valleys.rb +0 -29
- data/lib/sqa/indicator/predict_next_value.rb +0 -202
- data/lib/sqa/indicator/relative_strength_index.rb +0 -47
- data/lib/sqa/indicator/simple_moving_average.rb +0 -24
- data/lib/sqa/indicator/simple_moving_average_trend.rb +0 -32
- data/lib/sqa/indicator/stochastic_oscillator.rb +0 -68
- data/lib/sqa/indicator/true_range.rb +0 -39
- data/lib/sqa/trade.rb +0 -26
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sqa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dewayne VanHoozer
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: alphavantage
|
|
@@ -25,7 +24,7 @@ dependencies:
|
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
27
|
+
name: csv
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
@@ -39,7 +38,7 @@ dependencies:
|
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: '0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: faraday
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - ">="
|
|
@@ -53,7 +52,7 @@ dependencies:
|
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
53
|
version: '0'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
55
|
+
name: hashie
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - ">="
|
|
@@ -67,19 +66,19 @@ dependencies:
|
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
67
|
version: '0'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
69
|
+
name: kbs
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
72
71
|
requirements:
|
|
73
|
-
- - "
|
|
72
|
+
- - ">="
|
|
74
73
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
74
|
+
version: '0'
|
|
76
75
|
type: :runtime
|
|
77
76
|
prerelease: false
|
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
78
|
requirements:
|
|
80
|
-
- - "
|
|
79
|
+
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
81
|
+
version: '0'
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
84
83
|
name: lite-statistics
|
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,7 +108,63 @@ dependencies:
|
|
|
109
108
|
- !ruby/object:Gem::Version
|
|
110
109
|
version: '0'
|
|
111
110
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
111
|
+
name: redis
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0'
|
|
117
|
+
type: :runtime
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: ruby_llm
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '0'
|
|
131
|
+
type: :runtime
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
138
|
+
- !ruby/object:Gem::Dependency
|
|
139
|
+
name: ruby_llm-mcp
|
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
|
141
|
+
requirements:
|
|
142
|
+
- - ">="
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '0'
|
|
145
|
+
type: :runtime
|
|
146
|
+
prerelease: false
|
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
+
requirements:
|
|
149
|
+
- - ">="
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '0'
|
|
152
|
+
- !ruby/object:Gem::Dependency
|
|
153
|
+
name: shared_tools
|
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
|
155
|
+
requirements:
|
|
156
|
+
- - ">="
|
|
157
|
+
- !ruby/object:Gem::Version
|
|
158
|
+
version: '0'
|
|
159
|
+
type: :runtime
|
|
160
|
+
prerelease: false
|
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
+
requirements:
|
|
163
|
+
- - ">="
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '0'
|
|
166
|
+
- !ruby/object:Gem::Dependency
|
|
167
|
+
name: sqa-tai
|
|
113
168
|
requirement: !ruby/object:Gem::Requirement
|
|
114
169
|
requirements:
|
|
115
170
|
- - ">="
|
|
@@ -136,6 +191,62 @@ dependencies:
|
|
|
136
191
|
- - ">="
|
|
137
192
|
- !ruby/object:Gem::Version
|
|
138
193
|
version: '0'
|
|
194
|
+
- !ruby/object:Gem::Dependency
|
|
195
|
+
name: eps
|
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
|
197
|
+
requirements:
|
|
198
|
+
- - ">="
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '0'
|
|
201
|
+
type: :runtime
|
|
202
|
+
prerelease: false
|
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - ">="
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: '0'
|
|
208
|
+
- !ruby/object:Gem::Dependency
|
|
209
|
+
name: polars-df
|
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - ">="
|
|
213
|
+
- !ruby/object:Gem::Version
|
|
214
|
+
version: '0'
|
|
215
|
+
type: :runtime
|
|
216
|
+
prerelease: false
|
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
218
|
+
requirements:
|
|
219
|
+
- - ">="
|
|
220
|
+
- !ruby/object:Gem::Version
|
|
221
|
+
version: '0'
|
|
222
|
+
- !ruby/object:Gem::Dependency
|
|
223
|
+
name: toml-rb
|
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
|
225
|
+
requirements:
|
|
226
|
+
- - ">="
|
|
227
|
+
- !ruby/object:Gem::Version
|
|
228
|
+
version: '0'
|
|
229
|
+
type: :runtime
|
|
230
|
+
prerelease: false
|
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
232
|
+
requirements:
|
|
233
|
+
- - ">="
|
|
234
|
+
- !ruby/object:Gem::Version
|
|
235
|
+
version: '0'
|
|
236
|
+
- !ruby/object:Gem::Dependency
|
|
237
|
+
name: regent
|
|
238
|
+
requirement: !ruby/object:Gem::Requirement
|
|
239
|
+
requirements:
|
|
240
|
+
- - ">="
|
|
241
|
+
- !ruby/object:Gem::Version
|
|
242
|
+
version: '0'
|
|
243
|
+
type: :runtime
|
|
244
|
+
prerelease: false
|
|
245
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
246
|
+
requirements:
|
|
247
|
+
- - ">="
|
|
248
|
+
- !ruby/object:Gem::Version
|
|
249
|
+
version: '0'
|
|
139
250
|
- !ruby/object:Gem::Dependency
|
|
140
251
|
name: amazing_print
|
|
141
252
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -234,22 +345,34 @@ dependencies:
|
|
|
234
345
|
- - ">="
|
|
235
346
|
- !ruby/object:Gem::Version
|
|
236
347
|
version: '0'
|
|
237
|
-
description:
|
|
238
|
-
|
|
348
|
+
description: |
|
|
349
|
+
Simplistic playpen (e.g. not for serious use) for doing
|
|
350
|
+
technical analysis of stock prices. Under Construction.
|
|
239
351
|
email:
|
|
240
352
|
- dvanhoozer@gmail.com
|
|
241
353
|
executables:
|
|
242
|
-
- sqa
|
|
354
|
+
- sqa-console
|
|
243
355
|
extensions: []
|
|
244
356
|
extra_rdoc_files: []
|
|
245
357
|
files:
|
|
246
358
|
- ".config/tocer/configuration.yml"
|
|
247
359
|
- ".envrc"
|
|
360
|
+
- ".goose/memory/development.txt"
|
|
361
|
+
- ".semver"
|
|
362
|
+
- ARCHITECTURE.md
|
|
248
363
|
- CHANGELOG.md
|
|
364
|
+
- CLAUDE.md
|
|
365
|
+
- COMMITS.md
|
|
366
|
+
- DATAFRAME_ARCHITECTURE_REVIEW.md
|
|
249
367
|
- LICENSE
|
|
368
|
+
- NEXT-STEPS.md
|
|
250
369
|
- README.md
|
|
251
370
|
- Rakefile
|
|
252
|
-
-
|
|
371
|
+
- TASKS.md
|
|
372
|
+
- TEST_RESULTS.md
|
|
373
|
+
- TODO.md
|
|
374
|
+
- _notes.txt
|
|
375
|
+
- bin/sqa-console
|
|
253
376
|
- checksums/sqa-0.0.1.gem.sha512
|
|
254
377
|
- checksums/sqa-0.0.10.gem.sha512
|
|
255
378
|
- checksums/sqa-0.0.11.gem.sha512
|
|
@@ -272,90 +395,179 @@ files:
|
|
|
272
395
|
- checksums/sqa-0.0.7.gem.sha512
|
|
273
396
|
- checksums/sqa-0.0.8.gem.sha512
|
|
274
397
|
- checksums/sqa-0.0.9.gem.sha512
|
|
398
|
+
- data/talk_talk.json
|
|
399
|
+
- develop_summary.md
|
|
275
400
|
- docs/.gitignore
|
|
276
401
|
- docs/README.md
|
|
402
|
+
- docs/advanced/backtesting.md
|
|
403
|
+
- docs/advanced/ensemble.md
|
|
404
|
+
- docs/advanced/fpop.md
|
|
405
|
+
- docs/advanced/index.md
|
|
406
|
+
- docs/advanced/multi-timeframe.md
|
|
407
|
+
- docs/advanced/pattern-matcher.md
|
|
408
|
+
- docs/advanced/portfolio-optimizer.md
|
|
409
|
+
- docs/advanced/portfolio.md
|
|
410
|
+
- docs/advanced/risk-management.md
|
|
411
|
+
- docs/advanced/strategy-generator.md
|
|
412
|
+
- docs/advanced/streaming.md
|
|
413
|
+
- docs/ai_and_ml.md
|
|
277
414
|
- docs/alpha_vantage_technical_indicators.md
|
|
415
|
+
- docs/api/dataframe.md
|
|
416
|
+
- docs/api/index.md
|
|
417
|
+
- docs/assets/css/custom.css
|
|
418
|
+
- docs/assets/js/mathjax.js
|
|
278
419
|
- docs/average_true_range.md
|
|
279
420
|
- docs/bollinger_bands.md
|
|
280
421
|
- docs/candlestick_pattern_recognizer.md
|
|
422
|
+
- docs/concepts/index.md
|
|
423
|
+
- docs/contributing/index.md
|
|
424
|
+
- docs/data-sources/index.md
|
|
281
425
|
- docs/data_frame.md
|
|
282
426
|
- docs/donchian_channel.md
|
|
283
427
|
- docs/double_top_bottom_pattern.md
|
|
284
428
|
- docs/exponential_moving_average.md
|
|
429
|
+
- docs/factors_that_impact_price.md
|
|
285
430
|
- docs/fibonacci_retracement.md
|
|
431
|
+
- docs/finviz.md
|
|
432
|
+
- docs/fx_pro_bit.md
|
|
433
|
+
- docs/genetic_programming.md
|
|
434
|
+
- docs/getting-started/index.md
|
|
435
|
+
- docs/getting-started/installation.md
|
|
436
|
+
- docs/getting-started/quick-start.md
|
|
286
437
|
- docs/head_and_shoulders_pattern.md
|
|
438
|
+
- docs/i_gotta_an_idea.md
|
|
287
439
|
- docs/identify_wave_condition.md
|
|
440
|
+
- docs/index.md
|
|
288
441
|
- docs/indicators.md
|
|
442
|
+
- docs/indicators/index.md
|
|
289
443
|
- docs/libsvm_file_format.md
|
|
290
444
|
- docs/market_profile.md
|
|
291
445
|
- docs/mean_reversion.md
|
|
292
446
|
- docs/momentum.md
|
|
293
447
|
- docs/moving_average_convergence_divergence.md
|
|
448
|
+
- docs/options.md
|
|
294
449
|
- docs/peaks_and_valleys.md
|
|
295
450
|
- docs/predict_next_value.md
|
|
296
451
|
- docs/relative_strength_index.md
|
|
297
452
|
- docs/requirements.md
|
|
298
453
|
- docs/simple_moving_average.md
|
|
299
454
|
- docs/stochastic_oscillator.md
|
|
455
|
+
- docs/strategies/bollinger-bands.md
|
|
456
|
+
- docs/strategies/consensus.md
|
|
457
|
+
- docs/strategies/custom.md
|
|
458
|
+
- docs/strategies/ema.md
|
|
459
|
+
- docs/strategies/index.md
|
|
460
|
+
- docs/strategies/kbs.md
|
|
461
|
+
- docs/strategies/macd.md
|
|
462
|
+
- docs/strategies/market-profile.md
|
|
463
|
+
- docs/strategies/mean-reversion.md
|
|
464
|
+
- docs/strategies/rsi.md
|
|
465
|
+
- docs/strategies/sma.md
|
|
466
|
+
- docs/strategies/stochastic.md
|
|
467
|
+
- docs/strategies/volume-breakout.md
|
|
300
468
|
- docs/strategy.md
|
|
301
469
|
- docs/ta_lib.md
|
|
470
|
+
- docs/tags.md
|
|
302
471
|
- docs/terms_of_use.md
|
|
303
472
|
- docs/true_range.md
|
|
304
|
-
-
|
|
473
|
+
- docs/true_strength_index.md
|
|
474
|
+
- docs/weighted_moving_average.md
|
|
475
|
+
- examples/README.md
|
|
476
|
+
- examples/advanced_features_example.rb
|
|
477
|
+
- examples/fpop_analysis_example.rb
|
|
478
|
+
- examples/genetic_programming_example.rb
|
|
479
|
+
- examples/kbs_strategy_example.rb
|
|
480
|
+
- examples/pattern_context_example.rb
|
|
481
|
+
- examples/rails_app/Gemfile
|
|
482
|
+
- examples/rails_app/README.md
|
|
483
|
+
- examples/rails_app/app/assets/javascripts/application.js
|
|
484
|
+
- examples/rails_app/app/assets/stylesheets/application.css
|
|
485
|
+
- examples/rails_app/app/controllers/analysis_controller.rb
|
|
486
|
+
- examples/rails_app/app/controllers/api/v1/stocks_controller.rb
|
|
487
|
+
- examples/rails_app/app/controllers/application_controller.rb
|
|
488
|
+
- examples/rails_app/app/controllers/backtest_controller.rb
|
|
489
|
+
- examples/rails_app/app/controllers/dashboard_controller.rb
|
|
490
|
+
- examples/rails_app/app/controllers/portfolio_controller.rb
|
|
491
|
+
- examples/rails_app/app/views/analysis/show.html.erb
|
|
492
|
+
- examples/rails_app/app/views/backtest/show.html.erb
|
|
493
|
+
- examples/rails_app/app/views/dashboard/index.html.erb
|
|
494
|
+
- examples/rails_app/app/views/dashboard/show.html.erb
|
|
495
|
+
- examples/rails_app/app/views/errors/show.html.erb
|
|
496
|
+
- examples/rails_app/app/views/layouts/application.html.erb
|
|
497
|
+
- examples/rails_app/app/views/portfolio/index.html.erb
|
|
498
|
+
- examples/rails_app/bin/rails
|
|
499
|
+
- examples/rails_app/config.ru
|
|
500
|
+
- examples/rails_app/config/application.rb
|
|
501
|
+
- examples/rails_app/config/boot.rb
|
|
502
|
+
- examples/rails_app/config/database.yml
|
|
503
|
+
- examples/rails_app/config/environment.rb
|
|
504
|
+
- examples/rails_app/config/routes.rb
|
|
505
|
+
- examples/realtime_stream_example.rb
|
|
506
|
+
- examples/sinatra_app/Gemfile
|
|
507
|
+
- examples/sinatra_app/QUICKSTART.md
|
|
508
|
+
- examples/sinatra_app/README.md
|
|
509
|
+
- examples/sinatra_app/app.rb
|
|
510
|
+
- examples/sinatra_app/config.ru
|
|
511
|
+
- examples/sinatra_app/public/css/style.css
|
|
512
|
+
- examples/sinatra_app/public/js/app.js
|
|
513
|
+
- examples/sinatra_app/views/analyze.erb
|
|
514
|
+
- examples/sinatra_app/views/backtest.erb
|
|
515
|
+
- examples/sinatra_app/views/dashboard.erb
|
|
516
|
+
- examples/sinatra_app/views/error.erb
|
|
517
|
+
- examples/sinatra_app/views/index.erb
|
|
518
|
+
- examples/sinatra_app/views/layout.erb
|
|
519
|
+
- examples/sinatra_app/views/portfolio.erb
|
|
520
|
+
- examples/strategy_generator_example.rb
|
|
521
|
+
- hsa_portfolio.csv
|
|
522
|
+
- justfile
|
|
523
|
+
- lib/api/alpha_vantage_api.rb
|
|
305
524
|
- lib/patches/string.rb
|
|
306
525
|
- lib/sqa.rb
|
|
307
|
-
- lib/sqa/
|
|
308
|
-
- lib/sqa/cli.rb
|
|
309
|
-
- lib/sqa/commands.rb
|
|
310
|
-
- lib/sqa/commands/analysis.rb
|
|
311
|
-
- lib/sqa/commands/base.rb
|
|
312
|
-
- lib/sqa/commands/web.rb
|
|
526
|
+
- lib/sqa/backtest.rb
|
|
313
527
|
- lib/sqa/config.rb
|
|
314
|
-
- lib/sqa/constants.rb
|
|
315
528
|
- lib/sqa/data_frame.rb
|
|
316
529
|
- lib/sqa/data_frame/alpha_vantage.rb
|
|
530
|
+
- lib/sqa/data_frame/data.rb
|
|
317
531
|
- lib/sqa/data_frame/yahoo_finance.rb
|
|
532
|
+
- lib/sqa/ensemble.rb
|
|
318
533
|
- lib/sqa/errors.rb
|
|
534
|
+
- lib/sqa/fpop.rb
|
|
535
|
+
- lib/sqa/gp.rb
|
|
319
536
|
- lib/sqa/indicator.rb
|
|
320
|
-
- lib/sqa/indicator/average_true_range.rb
|
|
321
|
-
- lib/sqa/indicator/bollinger_bands.rb
|
|
322
|
-
- lib/sqa/indicator/candlestick_pattern_recognizer.rb
|
|
323
|
-
- lib/sqa/indicator/donchian_channel.rb
|
|
324
|
-
- lib/sqa/indicator/double_top_bottom_pattern.rb
|
|
325
|
-
- lib/sqa/indicator/elliott_wave_theory.rb
|
|
326
|
-
- lib/sqa/indicator/exponential_moving_average.rb
|
|
327
|
-
- lib/sqa/indicator/exponential_moving_average_trend.rb
|
|
328
|
-
- lib/sqa/indicator/fibonacci_retracement.rb
|
|
329
|
-
- lib/sqa/indicator/head_and_shoulders_pattern.rb
|
|
330
|
-
- lib/sqa/indicator/market_profile.rb
|
|
331
|
-
- lib/sqa/indicator/mean_reversion.rb
|
|
332
|
-
- lib/sqa/indicator/momentum.rb
|
|
333
|
-
- lib/sqa/indicator/moving_average_convergence_divergence.rb
|
|
334
|
-
- lib/sqa/indicator/peaks_and_valleys.rb
|
|
335
|
-
- lib/sqa/indicator/predict_next_value.rb
|
|
336
|
-
- lib/sqa/indicator/relative_strength_index.rb
|
|
337
|
-
- lib/sqa/indicator/simple_moving_average.rb
|
|
338
|
-
- lib/sqa/indicator/simple_moving_average_trend.rb
|
|
339
|
-
- lib/sqa/indicator/stochastic_oscillator.rb
|
|
340
|
-
- lib/sqa/indicator/true_range.rb
|
|
341
537
|
- lib/sqa/init.rb
|
|
538
|
+
- lib/sqa/market_regime.rb
|
|
539
|
+
- lib/sqa/multi_timeframe.rb
|
|
540
|
+
- lib/sqa/pattern_matcher.rb
|
|
342
541
|
- lib/sqa/plugin_manager.rb
|
|
343
542
|
- lib/sqa/portfolio.rb
|
|
543
|
+
- lib/sqa/portfolio_optimizer.rb
|
|
544
|
+
- lib/sqa/risk_manager.rb
|
|
545
|
+
- lib/sqa/seasonal_analyzer.rb
|
|
546
|
+
- lib/sqa/sector_analyzer.rb
|
|
344
547
|
- lib/sqa/stock.rb
|
|
345
548
|
- lib/sqa/strategy.rb
|
|
346
549
|
- lib/sqa/strategy/README.md
|
|
550
|
+
- lib/sqa/strategy/bollinger_bands.rb
|
|
347
551
|
- lib/sqa/strategy/common.rb
|
|
348
552
|
- lib/sqa/strategy/consensus.rb
|
|
349
553
|
- lib/sqa/strategy/ema.rb
|
|
554
|
+
- lib/sqa/strategy/kbs_strategy.rb
|
|
555
|
+
- lib/sqa/strategy/macd.rb
|
|
350
556
|
- lib/sqa/strategy/mp.rb
|
|
351
557
|
- lib/sqa/strategy/mr.rb
|
|
352
558
|
- lib/sqa/strategy/random.md
|
|
353
559
|
- lib/sqa/strategy/random.rb
|
|
354
560
|
- lib/sqa/strategy/rsi.rb
|
|
355
561
|
- lib/sqa/strategy/sma.rb
|
|
562
|
+
- lib/sqa/strategy/stochastic.rb
|
|
563
|
+
- lib/sqa/strategy/volume_breakout.rb
|
|
564
|
+
- lib/sqa/strategy_generator.rb
|
|
565
|
+
- lib/sqa/stream.rb
|
|
356
566
|
- lib/sqa/ticker.rb
|
|
357
|
-
- lib/sqa/trade.rb
|
|
358
567
|
- lib/sqa/version.rb
|
|
568
|
+
- main.just
|
|
569
|
+
- mkdocs.yml
|
|
570
|
+
- trace.log
|
|
359
571
|
homepage: https://github.com/MadBomber/sqa
|
|
360
572
|
licenses:
|
|
361
573
|
- MIT
|
|
@@ -364,7 +576,6 @@ metadata:
|
|
|
364
576
|
homepage_uri: https://github.com/MadBomber/sqa
|
|
365
577
|
source_code_uri: https://github.com/MadBomber/sqa
|
|
366
578
|
changelog_uri: https://github.com/MadBomber/sqa
|
|
367
|
-
post_install_message:
|
|
368
579
|
rdoc_options: []
|
|
369
580
|
require_paths:
|
|
370
581
|
- lib
|
|
@@ -372,15 +583,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
372
583
|
requirements:
|
|
373
584
|
- - ">="
|
|
374
585
|
- !ruby/object:Gem::Version
|
|
375
|
-
version: '2
|
|
586
|
+
version: '3.2'
|
|
376
587
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
377
588
|
requirements:
|
|
378
589
|
- - ">="
|
|
379
590
|
- !ruby/object:Gem::Version
|
|
380
591
|
version: '0'
|
|
381
592
|
requirements: []
|
|
382
|
-
rubygems_version: 3.
|
|
383
|
-
signing_key:
|
|
593
|
+
rubygems_version: 3.7.2
|
|
384
594
|
specification_version: 4
|
|
385
|
-
summary: sqa -
|
|
595
|
+
summary: sqa - Simple Qualitative Analysis
|
|
386
596
|
test_files: []
|
data/bin/sqa
DELETED
data/lib/patches/dry-cli.rb
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
# sqa/lib/patches/dry-cli.rb
|
|
2
|
-
|
|
3
|
-
#####################################################################
|
|
4
|
-
###
|
|
5
|
-
## File: dry-cli.rb
|
|
6
|
-
## Desc: Monkey around with the Dry::CLI class.
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
=begin
|
|
11
|
-
This monkey patch adds four new class methods to the Command class:
|
|
12
|
-
|
|
13
|
-
global_header .. Program/Glocal context custom header/footer
|
|
14
|
-
global_footer ..
|
|
15
|
-
header ......... Command context custom header / footer
|
|
16
|
-
footer .........
|
|
17
|
-
|
|
18
|
-
In addition to the new commands, tail-patched call methods in the
|
|
19
|
-
Banner and Usage modules wrap the existing help text formatting
|
|
20
|
-
with the appropriate global and command level header and footer
|
|
21
|
-
text.
|
|
22
|
-
|
|
23
|
-
The expected usage pattern is to have the global customerized
|
|
24
|
-
header / footer help text defined in the Base command class
|
|
25
|
-
for an application. All other commands inherent from this
|
|
26
|
-
Base class.
|
|
27
|
-
|
|
28
|
-
The header / footer class methods are used to wrap the command
|
|
29
|
-
help text. When "--help" is used on a command, the customerized
|
|
30
|
-
global header and footer text are on the outside of the help text.
|
|
31
|
-
The customized command header / footer are inside of the
|
|
32
|
-
global context but still wrap the original help text
|
|
33
|
-
|
|
34
|
-
Here is an example help output:
|
|
35
|
-
|
|
36
|
-
$ ./bin_cli.rb start --help
|
|
37
|
-
== Base Global Header ==
|
|
38
|
-
== Start Header ==
|
|
39
|
-
Command:
|
|
40
|
-
bin_cli.rb start
|
|
41
|
-
|
|
42
|
-
Usage:
|
|
43
|
-
bin_cli.rb start ROOT | bin_cli.rb start SUBCOMMAND
|
|
44
|
-
|
|
45
|
-
Description:
|
|
46
|
-
Start Foo machinery
|
|
47
|
-
|
|
48
|
-
Subcommands:
|
|
49
|
-
version # Print version
|
|
50
|
-
|
|
51
|
-
Arguments:
|
|
52
|
-
ROOT # REQUIRED Root directory
|
|
53
|
-
|
|
54
|
-
Options:
|
|
55
|
-
--[no-]debug, -d, --debug # Print debug information, default: false
|
|
56
|
-
--[no-]verbose, -v, --verbose # Print verbose information, default: false
|
|
57
|
-
--[no-]xyzzy, -x, --xyzzy # Magic, default: false
|
|
58
|
-
--help, -h # Print this help
|
|
59
|
-
|
|
60
|
-
Examples:
|
|
61
|
-
bin_cli.rb start path/to/root # Start Foo at root directory
|
|
62
|
-
== Start Footer ==
|
|
63
|
-
== Base Global Footer ==
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
=end
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
module Dry::CLI::Banner
|
|
70
|
-
class << self
|
|
71
|
-
alias_method :original_call, :call
|
|
72
|
-
|
|
73
|
-
# Overwrites the original 'call' method to accommodate a custom header and footer
|
|
74
|
-
# for the help text.
|
|
75
|
-
# @param command [Class] the the command class
|
|
76
|
-
# @param name [String] command line without help option
|
|
77
|
-
# @return [String] modified help text
|
|
78
|
-
|
|
79
|
-
def call(command, name)
|
|
80
|
-
help_text = original_call(command, name)
|
|
81
|
-
|
|
82
|
-
my_header, my_footer = command_help_wrapper(command)
|
|
83
|
-
|
|
84
|
-
help_text.prepend(my_header)
|
|
85
|
-
help_text += my_footer
|
|
86
|
-
|
|
87
|
-
help_text
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
# Provides the header and footer for the received command.
|
|
92
|
-
# @param command [Class] the command class
|
|
93
|
-
# @return [Array<String>] an array with the header at the 0 index and
|
|
94
|
-
# the footer at the 1 index
|
|
95
|
-
|
|
96
|
-
def command_help_wrapper(command)
|
|
97
|
-
global_header = Dry::CLI::Command.global_header
|
|
98
|
-
global_footer = Dry::CLI::Command.global_footer
|
|
99
|
-
command_header = command.header
|
|
100
|
-
command_footer = command.footer
|
|
101
|
-
|
|
102
|
-
my_header = ""
|
|
103
|
-
my_header += global_header + "\n" unless (global_header.nil? || global_header.empty?)
|
|
104
|
-
my_header += command_header+ "\n" unless (command_header.nil?|| command_header.empty?)
|
|
105
|
-
|
|
106
|
-
my_footer = ""
|
|
107
|
-
my_footer += "\n" + command_footer unless (command_footer.nil?|| command_footer.empty?)
|
|
108
|
-
my_footer += "\n" + global_footer unless (global_footer.nil? || global_footer.empty?)
|
|
109
|
-
|
|
110
|
-
[my_header, my_footer]
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
module Dry::CLI::Usage
|
|
117
|
-
class << self
|
|
118
|
-
alias_method :original_call, :call
|
|
119
|
-
|
|
120
|
-
# Overwrites the original 'call' method to allow a global header
|
|
121
|
-
# and footer wrap for the help text.
|
|
122
|
-
# @return [String] modified help text
|
|
123
|
-
|
|
124
|
-
def call(result)
|
|
125
|
-
help_text = original_call(result)
|
|
126
|
-
|
|
127
|
-
global_header = Dry::CLI::Command.global_header
|
|
128
|
-
global_footer = Dry::CLI::Command.global_footer
|
|
129
|
-
|
|
130
|
-
help_text.prepend(global_header + "\n") unless (global_header.nil? || global_header.empty?)
|
|
131
|
-
help_text += "\n" + global_footer unless (global_footer.nil? || global_footer.empty?)
|
|
132
|
-
|
|
133
|
-
help_text
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
class Dry::CLI::Command
|
|
140
|
-
# Provides a way to set a custom, command specific header.
|
|
141
|
-
# @param a_string [String] optional, header text
|
|
142
|
-
# @return [String] header text
|
|
143
|
-
|
|
144
|
-
def self.header(a_string=nil)
|
|
145
|
-
if a_string.nil?
|
|
146
|
-
@header_string
|
|
147
|
-
else
|
|
148
|
-
@header_string = a_string
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
# Provides a way to set a custom, command specific footer.
|
|
154
|
-
# @param a_string [String] optional, footer text
|
|
155
|
-
# @return [String] footer text
|
|
156
|
-
|
|
157
|
-
def self.footer(a_string=nil)
|
|
158
|
-
if a_string.nil?
|
|
159
|
-
@footer_string
|
|
160
|
-
else
|
|
161
|
-
@footer_string = a_string
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
# Provides a way to set a global custom header to overwrite the default one.
|
|
167
|
-
# @param a_string [String] optional, global header text
|
|
168
|
-
# @return [String] global header text
|
|
169
|
-
|
|
170
|
-
def self.global_header(a_string=nil)
|
|
171
|
-
if a_string.nil?
|
|
172
|
-
@@global_header_string
|
|
173
|
-
else
|
|
174
|
-
@@global_header_string = a_string
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
# Provides a way to set a global custom footer to overwrite the default one.
|
|
180
|
-
# @param a_string [String] optional, global footer text
|
|
181
|
-
# @return [String] global footer text
|
|
182
|
-
|
|
183
|
-
def self.global_footer(a_string=nil)
|
|
184
|
-
if a_string.nil?
|
|
185
|
-
@@global_footer_string
|
|
186
|
-
else
|
|
187
|
-
@@global_footer_string = a_string
|
|
188
|
-
end
|
|
189
|
-
end
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
# Add option value transformation based upon the value of the
|
|
194
|
-
# option's "type:" parameter.
|
|
195
|
-
|
|
196
|
-
module Dry::CLI::Parser
|
|
197
|
-
TRANSFORMERS = {
|
|
198
|
-
integer: -> (v) { v&.to_i },
|
|
199
|
-
float: -> (v) { v&.to_f }
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
def self.call(command, arguments, prog_name)
|
|
203
|
-
original_arguments = arguments.dup
|
|
204
|
-
parsed_options = {}
|
|
205
|
-
|
|
206
|
-
OptionParser.new do |opts|
|
|
207
|
-
command.options.each do |option|
|
|
208
|
-
opts.on(*option.parser_options) do |value|
|
|
209
|
-
if TRANSFORMERS.has_key?(option.options[:type])
|
|
210
|
-
value = TRANSFORMERS[option.options[:type]].call(value)
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
parsed_options[option.name.to_sym] = value
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
opts.on_tail("-h", "--help") do
|
|
218
|
-
return Result.help
|
|
219
|
-
end
|
|
220
|
-
end.parse!(arguments)
|
|
221
|
-
|
|
222
|
-
parsed_options = command.default_params.merge(parsed_options)
|
|
223
|
-
parse_required_params(command, arguments, prog_name, parsed_options)
|
|
224
|
-
rescue ::OptionParser::ParseError
|
|
225
|
-
Result.failure("ERROR: \"#{prog_name}\" was called with arguments \"#{original_arguments.join(" ")}\"") # rubocop:disable Metrics/LineLength
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
|