@quantbrasil/cli 0.1.0-beta.3 → 0.1.0-beta.5

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.
Files changed (44) hide show
  1. package/README.md +18 -11
  2. package/dist/cli/index.d.ts +4 -4
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +15 -12
  5. package/dist/commands/auth.d.ts +18 -0
  6. package/dist/commands/auth.d.ts.map +1 -1
  7. package/dist/commands/auth.js +49 -0
  8. package/dist/commands/market.d.ts +1 -0
  9. package/dist/commands/market.d.ts.map +1 -1
  10. package/dist/commands/market.js +17 -1
  11. package/dist/commands/portfolios.d.ts +148 -8
  12. package/dist/commands/portfolios.d.ts.map +1 -1
  13. package/dist/commands/portfolios.js +557 -55
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +0 -1
  17. package/dist/vendor/core/capabilities/index.d.ts +0 -1
  18. package/dist/vendor/core/capabilities/index.d.ts.map +1 -1
  19. package/dist/vendor/core/capabilities/index.js +0 -1
  20. package/dist/vendor/core/capabilities/market.d.ts +9 -1
  21. package/dist/vendor/core/capabilities/market.d.ts.map +1 -1
  22. package/dist/vendor/core/capabilities/market.js +10 -0
  23. package/dist/vendor/core/capabilities/portfolios.d.ts +452 -56
  24. package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -1
  25. package/dist/vendor/core/capabilities/portfolios.js +434 -116
  26. package/dist/vendor/core/capabilities/registry.d.ts +714 -276
  27. package/dist/vendor/core/capabilities/registry.d.ts.map +1 -1
  28. package/dist/vendor/core/capabilities/registry.js +0 -2
  29. package/dist/vendor/core/capabilities/types.d.ts +1 -1
  30. package/dist/vendor/core/capabilities/types.d.ts.map +1 -1
  31. package/package.json +3 -3
  32. package/skills/quantbrasil/SKILL.md +9 -6
  33. package/skills/quantbrasil/references/cli.md +25 -25
  34. package/skills/quantbrasil/references/costs.md +4 -4
  35. package/skills/quantbrasil/references/errors.md +6 -5
  36. package/skills/quantbrasil/references/portfolios.md +103 -0
  37. package/skills/quantbrasil/references/unsupported.md +5 -2
  38. package/skills/quantbrasil/references/workflows.md +38 -26
  39. package/dist/commands/analytics.d.ts +0 -131
  40. package/dist/commands/analytics.d.ts.map +0 -1
  41. package/dist/commands/analytics.js +0 -291
  42. package/dist/vendor/core/capabilities/analytics.d.ts +0 -187
  43. package/dist/vendor/core/capabilities/analytics.d.ts.map +0 -1
  44. package/dist/vendor/core/capabilities/analytics.js +0 -214
@@ -1,214 +0,0 @@
1
- import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
2
- export const analyticsCapabilities = [
3
- {
4
- id: "analytics.historical-return",
5
- kind: "read",
6
- visibility: publicRuntimeVisibility,
7
- description: "Calculate historical return for a saved portfolio or an ad-hoc weighted basket.",
8
- http: {
9
- method: "POST",
10
- path: "/api/desk/tools/portfolio/historical_return",
11
- inputMode: "json_body",
12
- schemas: {
13
- request: "PortfolioHistoricalReturnRequest",
14
- response: "HistoricalReturnResponse",
15
- },
16
- },
17
- cli: {
18
- group: "analytics",
19
- command: "historical-return",
20
- summary: "Calculate historical return for a saved portfolio or repeated --asset inputs.",
21
- positional: [],
22
- options: [
23
- {
24
- kind: "option",
25
- flag: "--portfolio",
26
- name: "portfolio_id",
27
- type: "integer",
28
- required: false,
29
- placeholder: "ID",
30
- exclusiveGroup: "source",
31
- description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
32
- },
33
- {
34
- kind: "option",
35
- flag: "--asset",
36
- name: "assets",
37
- type: "string_array",
38
- required: false,
39
- placeholder: "TICKER[:PESO]",
40
- multiple: true,
41
- collectionFormat: "repeatable",
42
- exclusiveGroup: "source",
43
- description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:50.",
44
- },
45
- {
46
- kind: "option",
47
- flag: "--from",
48
- name: "start_date",
49
- type: "string",
50
- required: true,
51
- placeholder: "AAAA-MM-DD",
52
- description: "Inclusive start date in ISO format.",
53
- },
54
- {
55
- kind: "option",
56
- flag: "--to",
57
- name: "end_date",
58
- type: "string",
59
- required: true,
60
- placeholder: "AAAA-MM-DD",
61
- description: "Inclusive end date in ISO format.",
62
- },
63
- ],
64
- examples: [
65
- "quantbrasil analytics historical-return --portfolio 123 --from 2024-01-01 --to 2025-01-01",
66
- "quantbrasil analytics historical-return --asset PRIO3:50 --asset VALE3:50 --from 2021-01-01 --to 2025-01-01",
67
- ],
68
- },
69
- tool: {
70
- name: "qb_historical_return",
71
- title: "Calculate historical return",
72
- },
73
- outputModes: standardOutputModes,
74
- },
75
- {
76
- id: "analytics.beta",
77
- kind: "read",
78
- visibility: publicRuntimeVisibility,
79
- description: "Calculate portfolio beta against IBOV for a saved portfolio or an ad-hoc basket.",
80
- http: {
81
- method: "POST",
82
- path: "/api/desk/tools/portfolio/beta",
83
- inputMode: "json_body",
84
- schemas: {
85
- request: "PortfolioBetaRequest",
86
- response: "PortfolioBetaResponse",
87
- },
88
- },
89
- cli: {
90
- group: "analytics",
91
- command: "beta",
92
- summary: "Calculate portfolio beta against IBOV.",
93
- positional: [],
94
- options: [
95
- {
96
- kind: "option",
97
- flag: "--portfolio",
98
- name: "portfolio_id",
99
- type: "integer",
100
- required: false,
101
- placeholder: "ID",
102
- exclusiveGroup: "source",
103
- description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
104
- },
105
- {
106
- kind: "option",
107
- flag: "--asset",
108
- name: "assets",
109
- type: "string_array",
110
- required: false,
111
- placeholder: "TICKER[:PESO]",
112
- multiple: true,
113
- collectionFormat: "repeatable",
114
- exclusiveGroup: "source",
115
- description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PETR4:120 or WINFUT:-20.",
116
- },
117
- {
118
- kind: "option",
119
- flag: "--years",
120
- name: "years",
121
- type: "enum",
122
- required: false,
123
- placeholder: "ANOS",
124
- defaultValue: 1,
125
- enumValues: ["1", "3", "5"],
126
- description: "Historical lookback window in years. Accepted values: 1, 3, or 5.",
127
- },
128
- ],
129
- examples: [
130
- "quantbrasil analytics beta --portfolio 123 --years 3",
131
- "quantbrasil analytics beta --asset PRIO3:120 --asset WINFUT:-20 --years 1",
132
- ],
133
- },
134
- tool: {
135
- name: "qb_portfolio_beta",
136
- title: "Calculate portfolio beta",
137
- },
138
- outputModes: standardOutputModes,
139
- },
140
- {
141
- id: "analytics.var",
142
- kind: "read",
143
- visibility: publicRuntimeVisibility,
144
- description: "Calculate one-day Value-at-Risk for a saved portfolio or an ad-hoc basket.",
145
- http: {
146
- method: "POST",
147
- path: "/api/desk/tools/portfolio/var",
148
- inputMode: "json_body",
149
- schemas: {
150
- request: "PortfolioVaRRequest",
151
- response: "PortfolioVaRResponse",
152
- },
153
- },
154
- cli: {
155
- group: "analytics",
156
- command: "var",
157
- summary: "Calculate one-day Value-at-Risk for a portfolio or basket.",
158
- positional: [],
159
- options: [
160
- {
161
- kind: "option",
162
- flag: "--portfolio",
163
- name: "portfolio_id",
164
- type: "integer",
165
- required: false,
166
- placeholder: "ID",
167
- exclusiveGroup: "source",
168
- description: "Saved portfolio id. Use exactly one source: --portfolio or repeated --asset.",
169
- },
170
- {
171
- kind: "option",
172
- flag: "--asset",
173
- name: "assets",
174
- type: "string_array",
175
- required: false,
176
- placeholder: "TICKER[:PESO]",
177
- multiple: true,
178
- collectionFormat: "repeatable",
179
- exclusiveGroup: "source",
180
- description: "Repeatable ad-hoc asset input using TICKER[:WEIGHT_PCT], for example PRIO3:120 or WINFUT:-20.",
181
- },
182
- {
183
- kind: "option",
184
- flag: "--years",
185
- name: "years",
186
- type: "integer",
187
- required: false,
188
- placeholder: "ANOS",
189
- defaultValue: 1,
190
- description: "Historical lookback window in years. The VaR horizon remains one day.",
191
- },
192
- {
193
- kind: "option",
194
- flag: "--confidence",
195
- name: "confidence_pct",
196
- type: "number",
197
- required: false,
198
- placeholder: "PERCENTUAL",
199
- defaultValue: 95,
200
- description: "Confidence level in percent, for example 95 or 99.",
201
- },
202
- ],
203
- examples: [
204
- "quantbrasil analytics var --portfolio 123 --years 1 --confidence 95",
205
- "quantbrasil analytics var --asset PRIO3:50 --asset VALE3:50 --years 3 --confidence 99",
206
- ],
207
- },
208
- tool: {
209
- name: "qb_portfolio_var",
210
- title: "Calculate portfolio VaR",
211
- },
212
- outputModes: standardOutputModes,
213
- },
214
- ];