sqa 0.0.31 → 0.0.37
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/CHANGELOG.md +104 -0
- data/CLAUDE.md +21 -0
- data/README.md +60 -32
- data/Rakefile +52 -10
- data/docs/IMPROVEMENT_PLAN.md +531 -0
- data/docs/advanced/index.md +1 -13
- data/docs/api/dataframe.md +0 -1
- data/docs/api/index.md +547 -61
- data/docs/api-reference/alphavantageapi.md +1057 -0
- data/docs/api-reference/apierror.md +31 -0
- data/docs/api-reference/index.md +221 -0
- data/docs/api-reference/notimplemented.md +27 -0
- data/docs/api-reference/sqa.md +267 -0
- data/docs/api-reference/sqa_backtest.md +137 -0
- data/docs/api-reference/sqa_backtest_results.md +530 -0
- data/docs/api-reference/sqa_badparametererror.md +13 -0
- data/docs/api-reference/sqa_config.md +538 -0
- data/docs/api-reference/sqa_configurationerror.md +13 -0
- data/docs/api-reference/sqa_datafetcherror.md +56 -0
- data/docs/api-reference/sqa_dataframe.md +752 -0
- data/docs/api-reference/sqa_dataframe_alphavantage.md +30 -0
- data/docs/api-reference/sqa_dataframe_data.md +325 -0
- data/docs/api-reference/sqa_dataframe_yahoofinance.md +25 -0
- data/docs/api-reference/sqa_ensemble.md +413 -0
- data/docs/api-reference/sqa_fpop.md +211 -0
- data/docs/api-reference/sqa_geneticprogram.md +325 -0
- data/docs/api-reference/sqa_geneticprogram_individual.md +114 -0
- data/docs/api-reference/sqa_marketregime.md +212 -0
- data/docs/api-reference/sqa_multitimeframe.md +227 -0
- data/docs/api-reference/sqa_patternmatcher.md +195 -0
- data/docs/api-reference/sqa_pluginmanager.md +55 -0
- data/docs/api-reference/sqa_portfolio.md +455 -0
- data/docs/api-reference/sqa_portfolio_position.md +220 -0
- data/docs/api-reference/sqa_portfolio_trade.md +332 -0
- data/docs/api-reference/sqa_portfoliooptimizer.md +248 -0
- data/docs/api-reference/sqa_riskmanager.md +388 -0
- data/docs/api-reference/sqa_seasonalanalyzer.md +121 -0
- data/docs/api-reference/sqa_sectoranalyzer.md +163 -0
- data/docs/api-reference/sqa_stock.md +649 -0
- data/docs/api-reference/sqa_strategy.md +178 -0
- data/docs/api-reference/sqa_strategy_bollingerbands.md +26 -0
- data/docs/api-reference/sqa_strategy_common.md +29 -0
- data/docs/api-reference/sqa_strategy_consensus.md +129 -0
- data/docs/api-reference/sqa_strategy_ema.md +41 -0
- data/docs/api-reference/sqa_strategy_kbs.md +154 -0
- data/docs/api-reference/sqa_strategy_macd.md +26 -0
- data/docs/api-reference/sqa_strategy_mp.md +41 -0
- data/docs/api-reference/sqa_strategy_mr.md +41 -0
- data/docs/api-reference/sqa_strategy_random.md +41 -0
- data/docs/api-reference/sqa_strategy_rsi.md +41 -0
- data/docs/api-reference/sqa_strategy_sma.md +41 -0
- data/docs/api-reference/sqa_strategy_stochastic.md +26 -0
- data/docs/api-reference/sqa_strategy_volumebreakout.md +26 -0
- data/docs/api-reference/sqa_strategygenerator.md +298 -0
- data/docs/api-reference/sqa_strategygenerator_pattern.md +264 -0
- data/docs/api-reference/sqa_strategygenerator_patterncontext.md +326 -0
- data/docs/api-reference/sqa_strategygenerator_profitablepoint.md +424 -0
- data/docs/api-reference/sqa_stream.md +256 -0
- data/docs/api-reference/sqa_ticker.md +175 -0
- data/docs/api-reference/string.md +135 -0
- data/docs/assets/images/advanced-workflow.svg +89 -0
- data/docs/assets/images/architecture.svg +107 -0
- data/docs/assets/images/data-flow.svg +138 -0
- data/docs/assets/images/getting-started-workflow.svg +88 -0
- data/docs/assets/images/sqa.jpg +0 -0
- data/docs/assets/images/strategy-flow.svg +78 -0
- data/docs/assets/images/system-architecture.svg +150 -0
- data/docs/concepts/index.md +292 -27
- data/docs/data_frame.md +0 -1
- data/docs/getting-started/index.md +1 -30
- data/docs/getting-started/installation.md +2 -2
- data/docs/getting-started/quick-start.md +4 -4
- data/docs/index.md +26 -25
- data/docs/llms.txt +109 -0
- data/docs/strategies/bollinger-bands.md +1 -1
- data/docs/strategies/kbs.md +15 -14
- data/docs/strategies/rsi.md +1 -1
- data/docs/strategy.md +381 -3
- data/docs/terms_of_use.md +1 -1
- data/examples/README.md +10 -0
- data/lib/api/alpha_vantage_api.rb +3 -7
- data/lib/sqa/config.rb +109 -28
- data/lib/sqa/data_frame/alpha_vantage.rb +13 -3
- data/lib/sqa/data_frame/data.rb +13 -1
- data/lib/sqa/data_frame.rb +189 -41
- data/lib/sqa/errors.rb +79 -17
- data/lib/sqa/indicator.rb +17 -4
- data/lib/sqa/init.rb +70 -15
- data/lib/sqa/pattern_matcher.rb +4 -4
- data/lib/sqa/portfolio.rb +1 -1
- data/lib/sqa/sector_analyzer.rb +3 -11
- data/lib/sqa/stock.rb +236 -20
- data/lib/sqa/strategy.rb +62 -4
- data/lib/sqa/ticker.rb +107 -42
- data/lib/sqa/version.rb +1 -1
- data/lib/sqa.rb +16 -8
- data/mkdocs.yml +68 -117
- metadata +90 -36
- data/docs/README.md +0 -43
- data/docs/alpha_vantage_technical_indicators.md +0 -62
- data/docs/average_true_range.md +0 -9
- data/docs/bollinger_bands.md +0 -15
- data/docs/candlestick_pattern_recognizer.md +0 -4
- data/docs/donchian_channel.md +0 -5
- data/docs/double_top_bottom_pattern.md +0 -3
- data/docs/exponential_moving_average.md +0 -19
- data/docs/fibonacci_retracement.md +0 -30
- data/docs/head_and_shoulders_pattern.md +0 -3
- data/docs/market_profile.md +0 -4
- data/docs/momentum.md +0 -19
- data/docs/moving_average_convergence_divergence.md +0 -23
- data/docs/peaks_and_valleys.md +0 -11
- data/docs/relative_strength_index.md +0 -6
- data/docs/simple_moving_average.md +0 -8
- data/docs/stochastic_oscillator.md +0 -4
- data/docs/ta_lib.md +0 -160
- data/docs/true_range.md +0 -12
- data/docs/true_strength_index.md +0 -46
- data/docs/weighted_moving_average.md +0 -48
- data/examples/sinatra_app/Gemfile +0 -22
- data/examples/sinatra_app/QUICKSTART.md +0 -159
- data/examples/sinatra_app/README.md +0 -461
- data/examples/sinatra_app/app.rb +0 -344
- data/examples/sinatra_app/config.ru +0 -5
- data/examples/sinatra_app/public/css/style.css +0 -659
- data/examples/sinatra_app/public/js/app.js +0 -107
- data/examples/sinatra_app/views/analyze.erb +0 -306
- data/examples/sinatra_app/views/backtest.erb +0 -325
- data/examples/sinatra_app/views/dashboard.erb +0 -419
- data/examples/sinatra_app/views/error.erb +0 -58
- data/examples/sinatra_app/views/index.erb +0 -118
- data/examples/sinatra_app/views/layout.erb +0 -61
- data/examples/sinatra_app/views/portfolio.erb +0 -43
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 📦 SQA::Strategy::RSI
|
|
2
|
+
|
|
3
|
+
!!! abstract "Source Information"
|
|
4
|
+
**Defined in:** `lib/sqa/strategy/rsi.rb:5`
|
|
5
|
+
|
|
6
|
+
**Inherits from:** `Object`
|
|
7
|
+
|
|
8
|
+
## 🏭 Class Methods
|
|
9
|
+
|
|
10
|
+
### `.trade(vector)`
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
??? info "Source Location"
|
|
16
|
+
`lib/sqa/strategy/rsi.rb:8`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
### `.trade_against(vector)`
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
??? info "Source Location"
|
|
26
|
+
`lib/sqa/strategy/common.rb:9`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### `.desc()`
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
??? info "Source Location"
|
|
36
|
+
`lib/sqa/strategy/common.rb:23`
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📝 Attributes
|
|
41
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 📦 SQA::Strategy::SMA
|
|
2
|
+
|
|
3
|
+
!!! abstract "Source Information"
|
|
4
|
+
**Defined in:** `lib/sqa/strategy/sma.rb:5`
|
|
5
|
+
|
|
6
|
+
**Inherits from:** `Object`
|
|
7
|
+
|
|
8
|
+
## 🏭 Class Methods
|
|
9
|
+
|
|
10
|
+
### `.trade(vector)`
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
??? info "Source Location"
|
|
16
|
+
`lib/sqa/strategy/sma.rb:8`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
### `.trade_against(vector)`
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
??? info "Source Location"
|
|
26
|
+
`lib/sqa/strategy/common.rb:9`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### `.desc()`
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
??? info "Source Location"
|
|
36
|
+
`lib/sqa/strategy/common.rb:23`
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📝 Attributes
|
|
41
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 📦 SQA::Strategy::Stochastic
|
|
2
|
+
|
|
3
|
+
!!! note "Description"
|
|
4
|
+
Stochastic Oscillator crossover strategy
|
|
5
|
+
Buy when %K crosses above %D in oversold territory (< 20)
|
|
6
|
+
Sell when %K crosses below %D in overbought territory (> 80)
|
|
7
|
+
|
|
8
|
+
!!! abstract "Source Information"
|
|
9
|
+
**Defined in:** `lib/sqa/strategy/stochastic.rb:8`
|
|
10
|
+
|
|
11
|
+
**Inherits from:** `Object`
|
|
12
|
+
|
|
13
|
+
## 🏭 Class Methods
|
|
14
|
+
|
|
15
|
+
### `.trade(vector)`
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
??? info "Source Location"
|
|
21
|
+
`lib/sqa/strategy/stochastic.rb:9`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📝 Attributes
|
|
26
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 📦 SQA::Strategy::VolumeBreakout
|
|
2
|
+
|
|
3
|
+
!!! note "Description"
|
|
4
|
+
Volume Breakout strategy
|
|
5
|
+
Buy when price breaks above resistance with high volume
|
|
6
|
+
Sell when price breaks below support with high volume
|
|
7
|
+
|
|
8
|
+
!!! abstract "Source Information"
|
|
9
|
+
**Defined in:** `lib/sqa/strategy/volume_breakout.rb:8`
|
|
10
|
+
|
|
11
|
+
**Inherits from:** `Object`
|
|
12
|
+
|
|
13
|
+
## 🏭 Class Methods
|
|
14
|
+
|
|
15
|
+
### `.trade(vector)`
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
??? info "Source Location"
|
|
21
|
+
`lib/sqa/strategy/volume_breakout.rb:9`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📝 Attributes
|
|
26
|
+
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# 📦 SQA::StrategyGenerator
|
|
2
|
+
|
|
3
|
+
!!! abstract "Source Information"
|
|
4
|
+
**Defined in:** `lib/sqa/strategy_generator.rb:36`
|
|
5
|
+
|
|
6
|
+
**Inherits from:** `Object`
|
|
7
|
+
|
|
8
|
+
## 🔨 Instance Methods
|
|
9
|
+
|
|
10
|
+
### `#stock()`
|
|
11
|
+
|
|
12
|
+
Returns the value of attribute stock.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
??? info "Source Location"
|
|
18
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### `#profitable_points()`
|
|
23
|
+
|
|
24
|
+
Returns the value of attribute profitable_points.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
??? info "Source Location"
|
|
30
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### `#patterns()`
|
|
35
|
+
|
|
36
|
+
Returns the value of attribute patterns.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
??? info "Source Location"
|
|
42
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### `#min_gain_percent()`
|
|
47
|
+
|
|
48
|
+
Returns the value of attribute min_gain_percent.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
??? info "Source Location"
|
|
54
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### `#fpop()`
|
|
59
|
+
|
|
60
|
+
Returns the value of attribute fpop.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
??? info "Source Location"
|
|
66
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### `#min_loss_percent()`
|
|
71
|
+
|
|
72
|
+
Returns the value of attribute min_loss_percent.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
??? info "Source Location"
|
|
78
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### `#indicators_config()`
|
|
83
|
+
|
|
84
|
+
Returns the value of attribute indicators_config.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
??? info "Source Location"
|
|
90
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### `#inflection_window()`
|
|
95
|
+
|
|
96
|
+
Returns the value of attribute inflection_window.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
??? info "Source Location"
|
|
102
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `#max_fpl_risk()`
|
|
107
|
+
|
|
108
|
+
Returns the value of attribute max_fpl_risk.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
??? info "Source Location"
|
|
114
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### `#required_fpl_directions()`
|
|
119
|
+
|
|
120
|
+
Returns the value of attribute required_fpl_directions.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
??? info "Source Location"
|
|
126
|
+
`lib/sqa/strategy_generator.rb:140`
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### `#initialize(stock:, min_gain_percent: = 10.0, min_loss_percent: = nil, fpop: = 10, inflection_window: = 3, max_fpl_risk: = nil, required_fpl_directions: = nil)`
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
!!! success "Returns"
|
|
134
|
+
|
|
135
|
+
**Type:** `StrategyGenerator`
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
a new instance of StrategyGenerator
|
|
140
|
+
|
|
141
|
+
??? info "Source Location"
|
|
142
|
+
`lib/sqa/strategy_generator.rb:144`
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### `#discover_patterns(min_pattern_frequency: = 2)`
|
|
147
|
+
|
|
148
|
+
Main entry point: Discover patterns in historical data
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
??? info "Source Location"
|
|
154
|
+
`lib/sqa/strategy_generator.rb:168`
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### `#generate_strategy(pattern_index: = 0, strategy_type: = :proc)`
|
|
159
|
+
|
|
160
|
+
Generate a trading strategy from discovered patterns
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
??? info "Source Location"
|
|
166
|
+
`lib/sqa/strategy_generator.rb:196`
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### `#generate_strategies(top_n: = 5, strategy_type: = :class)`
|
|
171
|
+
|
|
172
|
+
Generate multiple strategies from top N patterns
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
??? info "Source Location"
|
|
178
|
+
`lib/sqa/strategy_generator.rb:214`
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### `#print_patterns(max_patterns: = 10)`
|
|
183
|
+
|
|
184
|
+
Print discovered patterns
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
??? info "Source Location"
|
|
190
|
+
`lib/sqa/strategy_generator.rb:221`
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### `#export_patterns(filename)`
|
|
195
|
+
|
|
196
|
+
Export patterns to CSV
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
??? info "Source Location"
|
|
202
|
+
`lib/sqa/strategy_generator.rb:241`
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### `#walk_forward_validate(train_size: = 250, test_size: = 60, step_size: = 30)`
|
|
207
|
+
|
|
208
|
+
Walk-forward validation - discover patterns with time-series cross-validation
|
|
209
|
+
|
|
210
|
+
Splits data into train/test windows and rolls forward through history
|
|
211
|
+
to prevent overfitting. Only keeps patterns that work out-of-sample.
|
|
212
|
+
|
|
213
|
+
!!! info "Parameters"
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description |
|
|
216
|
+
|------|------|-------------|
|
|
217
|
+
| `train_size` | `Integer` | Training window size in days |
|
|
218
|
+
| `test_size` | `Integer` | Testing window size in days |
|
|
219
|
+
| `step_size` | `Integer` | How many days to step forward each iteration |
|
|
220
|
+
!!! success "Returns"
|
|
221
|
+
|
|
222
|
+
**Type:** `Hash`
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
Validation results with patterns and performance
|
|
227
|
+
|
|
228
|
+
??? info "Source Location"
|
|
229
|
+
`lib/sqa/strategy_generator.rb:273`
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### `#discover_context_aware_patterns(analyze_regime: = true, analyze_seasonal: = true, sector: = nil)`
|
|
234
|
+
|
|
235
|
+
Discover patterns with context (regime, seasonal, sector)
|
|
236
|
+
|
|
237
|
+
!!! info "Parameters"
|
|
238
|
+
|
|
239
|
+
| Name | Type | Description |
|
|
240
|
+
|------|------|-------------|
|
|
241
|
+
| `analyze_regime` | `Boolean` | Detect and filter by market regime |
|
|
242
|
+
| `analyze_seasonal` | `Boolean` | Detect seasonal patterns |
|
|
243
|
+
| `sector` | `Symbol` | Sector classification |
|
|
244
|
+
!!! success "Returns"
|
|
245
|
+
|
|
246
|
+
**Type:** `Array<Pattern>`
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
Patterns with context metadata
|
|
251
|
+
|
|
252
|
+
??? info "Source Location"
|
|
253
|
+
`lib/sqa/strategy_generator.rb:379`
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 📝 Attributes
|
|
258
|
+
|
|
259
|
+
### 👁️ `stock` <small>read-only</small>
|
|
260
|
+
|
|
261
|
+
Returns the value of attribute stock.
|
|
262
|
+
|
|
263
|
+
### 👁️ `profitable_points` <small>read-only</small>
|
|
264
|
+
|
|
265
|
+
Returns the value of attribute profitable_points.
|
|
266
|
+
|
|
267
|
+
### 👁️ `patterns` <small>read-only</small>
|
|
268
|
+
|
|
269
|
+
Returns the value of attribute patterns.
|
|
270
|
+
|
|
271
|
+
### 👁️ `min_gain_percent` <small>read-only</small>
|
|
272
|
+
|
|
273
|
+
Returns the value of attribute min_gain_percent.
|
|
274
|
+
|
|
275
|
+
### 👁️ `fpop` <small>read-only</small>
|
|
276
|
+
|
|
277
|
+
Returns the value of attribute fpop.
|
|
278
|
+
|
|
279
|
+
### 👁️ `min_loss_percent` <small>read-only</small>
|
|
280
|
+
|
|
281
|
+
Returns the value of attribute min_loss_percent.
|
|
282
|
+
|
|
283
|
+
### 👁️ `indicators_config` <small>read-only</small>
|
|
284
|
+
|
|
285
|
+
Returns the value of attribute indicators_config.
|
|
286
|
+
|
|
287
|
+
### 👁️ `inflection_window` <small>read-only</small>
|
|
288
|
+
|
|
289
|
+
Returns the value of attribute inflection_window.
|
|
290
|
+
|
|
291
|
+
### 👁️ `max_fpl_risk` <small>read-only</small>
|
|
292
|
+
|
|
293
|
+
Returns the value of attribute max_fpl_risk.
|
|
294
|
+
|
|
295
|
+
### 👁️ `required_fpl_directions` <small>read-only</small>
|
|
296
|
+
|
|
297
|
+
Returns the value of attribute required_fpl_directions.
|
|
298
|
+
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# 📦 SQA::StrategyGenerator::Pattern
|
|
2
|
+
|
|
3
|
+
!!! note "Description"
|
|
4
|
+
Represents a discovered indicator pattern
|
|
5
|
+
|
|
6
|
+
!!! abstract "Source Information"
|
|
7
|
+
**Defined in:** `lib/sqa/strategy_generator.rb:69`
|
|
8
|
+
|
|
9
|
+
**Inherits from:** `Object`
|
|
10
|
+
|
|
11
|
+
## 🔨 Instance Methods
|
|
12
|
+
|
|
13
|
+
### `#conditions()`
|
|
14
|
+
|
|
15
|
+
Returns the value of attribute conditions.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
??? info "Source Location"
|
|
21
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### `#conditions=(value)`
|
|
26
|
+
|
|
27
|
+
Sets the attribute conditions
|
|
28
|
+
|
|
29
|
+
!!! info "Parameters"
|
|
30
|
+
|
|
31
|
+
| Name | Type | Description |
|
|
32
|
+
|------|------|-------------|
|
|
33
|
+
| `value` | `Any` | the value to set the attribute conditions to. |
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
??? info "Source Location"
|
|
37
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### `#frequency()`
|
|
42
|
+
|
|
43
|
+
Returns the value of attribute frequency.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
??? info "Source Location"
|
|
49
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### `#frequency=(value)`
|
|
54
|
+
|
|
55
|
+
Sets the attribute frequency
|
|
56
|
+
|
|
57
|
+
!!! info "Parameters"
|
|
58
|
+
|
|
59
|
+
| Name | Type | Description |
|
|
60
|
+
|------|------|-------------|
|
|
61
|
+
| `value` | `Any` | the value to set the attribute frequency to. |
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
??? info "Source Location"
|
|
65
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### `#avg_gain()`
|
|
70
|
+
|
|
71
|
+
Returns the value of attribute avg_gain.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
??? info "Source Location"
|
|
77
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### `#avg_gain=(value)`
|
|
82
|
+
|
|
83
|
+
Sets the attribute avg_gain
|
|
84
|
+
|
|
85
|
+
!!! info "Parameters"
|
|
86
|
+
|
|
87
|
+
| Name | Type | Description |
|
|
88
|
+
|------|------|-------------|
|
|
89
|
+
| `value` | `Any` | the value to set the attribute avg_gain to. |
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
??? info "Source Location"
|
|
93
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### `#avg_holding_days()`
|
|
98
|
+
|
|
99
|
+
Returns the value of attribute avg_holding_days.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
??? info "Source Location"
|
|
105
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### `#avg_holding_days=(value)`
|
|
110
|
+
|
|
111
|
+
Sets the attribute avg_holding_days
|
|
112
|
+
|
|
113
|
+
!!! info "Parameters"
|
|
114
|
+
|
|
115
|
+
| Name | Type | Description |
|
|
116
|
+
|------|------|-------------|
|
|
117
|
+
| `value` | `Any` | the value to set the attribute avg_holding_days to. |
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
??? info "Source Location"
|
|
121
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### `#success_rate()`
|
|
126
|
+
|
|
127
|
+
Returns the value of attribute success_rate.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
??? info "Source Location"
|
|
133
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### `#success_rate=(value)`
|
|
138
|
+
|
|
139
|
+
Sets the attribute success_rate
|
|
140
|
+
|
|
141
|
+
!!! info "Parameters"
|
|
142
|
+
|
|
143
|
+
| Name | Type | Description |
|
|
144
|
+
|------|------|-------------|
|
|
145
|
+
| `value` | `Any` | the value to set the attribute success_rate to. |
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
??? info "Source Location"
|
|
149
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### `#occurrences()`
|
|
154
|
+
|
|
155
|
+
Returns the value of attribute occurrences.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
??? info "Source Location"
|
|
161
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### `#occurrences=(value)`
|
|
166
|
+
|
|
167
|
+
Sets the attribute occurrences
|
|
168
|
+
|
|
169
|
+
!!! info "Parameters"
|
|
170
|
+
|
|
171
|
+
| Name | Type | Description |
|
|
172
|
+
|------|------|-------------|
|
|
173
|
+
| `value` | `Any` | the value to set the attribute occurrences to. |
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
??? info "Source Location"
|
|
177
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### `#context()`
|
|
182
|
+
|
|
183
|
+
Returns the value of attribute context.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
??? info "Source Location"
|
|
189
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### `#context=(value)`
|
|
194
|
+
|
|
195
|
+
Sets the attribute context
|
|
196
|
+
|
|
197
|
+
!!! info "Parameters"
|
|
198
|
+
|
|
199
|
+
| Name | Type | Description |
|
|
200
|
+
|------|------|-------------|
|
|
201
|
+
| `value` | `Any` | the value to set the attribute context to. |
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
??? info "Source Location"
|
|
205
|
+
`lib/sqa/strategy_generator.rb:70`
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### `#initialize(conditions: = {})`
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
!!! success "Returns"
|
|
213
|
+
|
|
214
|
+
**Type:** `Pattern`
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
a new instance of Pattern
|
|
219
|
+
|
|
220
|
+
??? info "Source Location"
|
|
221
|
+
`lib/sqa/strategy_generator.rb:74`
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### `#to_s()`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
??? info "Source Location"
|
|
231
|
+
`lib/sqa/strategy_generator.rb:84`
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 📝 Attributes
|
|
236
|
+
|
|
237
|
+
### 🔄 `conditions` <small>read/write</small>
|
|
238
|
+
|
|
239
|
+
Returns the value of attribute conditions.
|
|
240
|
+
|
|
241
|
+
### 🔄 `frequency` <small>read/write</small>
|
|
242
|
+
|
|
243
|
+
Returns the value of attribute frequency.
|
|
244
|
+
|
|
245
|
+
### 🔄 `avg_gain` <small>read/write</small>
|
|
246
|
+
|
|
247
|
+
Returns the value of attribute avg_gain.
|
|
248
|
+
|
|
249
|
+
### 🔄 `avg_holding_days` <small>read/write</small>
|
|
250
|
+
|
|
251
|
+
Returns the value of attribute avg_holding_days.
|
|
252
|
+
|
|
253
|
+
### 🔄 `success_rate` <small>read/write</small>
|
|
254
|
+
|
|
255
|
+
Returns the value of attribute success_rate.
|
|
256
|
+
|
|
257
|
+
### 🔄 `occurrences` <small>read/write</small>
|
|
258
|
+
|
|
259
|
+
Returns the value of attribute occurrences.
|
|
260
|
+
|
|
261
|
+
### 🔄 `context` <small>read/write</small>
|
|
262
|
+
|
|
263
|
+
Returns the value of attribute context.
|
|
264
|
+
|