@quantbrasil/cli 0.1.0-beta.0 → 0.1.0-beta.10
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.
- package/README.md +63 -11
- package/dist/cli/client.js +4 -0
- package/dist/cli/index.d.ts +12 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +64 -14
- package/dist/cli/prompt.d.ts +1 -0
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +17 -0
- package/dist/cli/skills.d.ts +9 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +68 -4
- package/dist/commands/auth.d.ts +18 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +49 -0
- package/dist/commands/market.d.ts +1 -0
- package/dist/commands/market.d.ts.map +1 -1
- package/dist/commands/market.js +17 -1
- package/dist/commands/portfolios.d.ts +148 -8
- package/dist/commands/portfolios.d.ts.map +1 -1
- package/dist/commands/portfolios.js +557 -55
- package/dist/commands/rankings.d.ts +82 -0
- package/dist/commands/rankings.d.ts.map +1 -0
- package/dist/commands/rankings.js +235 -0
- package/dist/commands/screening.d.ts +120 -0
- package/dist/commands/screening.d.ts.map +1 -0
- package/dist/commands/screening.js +361 -0
- package/dist/commands/skills.js +7 -7
- package/dist/commands/update.d.ts +23 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +209 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/vendor/core/capabilities/index.d.ts +2 -1
- package/dist/vendor/core/capabilities/index.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/index.js +2 -1
- package/dist/vendor/core/capabilities/market.d.ts +9 -1
- package/dist/vendor/core/capabilities/market.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/market.js +10 -0
- package/dist/vendor/core/capabilities/portfolios.d.ts +452 -56
- package/dist/vendor/core/capabilities/portfolios.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/portfolios.js +434 -116
- package/dist/vendor/core/capabilities/rankings.d.ts +83 -0
- package/dist/vendor/core/capabilities/rankings.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/rankings.js +95 -0
- package/dist/vendor/core/capabilities/registry.d.ts +1279 -413
- package/dist/vendor/core/capabilities/registry.d.ts.map +1 -1
- package/dist/vendor/core/capabilities/registry.js +4 -2
- package/dist/vendor/core/capabilities/screening.d.ts +136 -0
- package/dist/vendor/core/capabilities/screening.d.ts.map +1 -0
- package/dist/vendor/core/capabilities/screening.js +155 -0
- package/dist/vendor/core/capabilities/types.d.ts +1 -1
- package/dist/vendor/core/capabilities/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/quantbrasil/SKILL.md +28 -11
- package/skills/quantbrasil/references/cli.md +96 -20
- package/skills/quantbrasil/references/costs.md +9 -4
- package/skills/quantbrasil/references/errors.md +16 -5
- package/skills/quantbrasil/references/portfolios.md +114 -0
- package/skills/quantbrasil/references/quality-eval-queries.json +127 -0
- package/skills/quantbrasil/references/rankings.md +62 -0
- package/skills/quantbrasil/references/screening.md +212 -0
- package/skills/quantbrasil/references/unsupported.md +7 -2
- package/skills/quantbrasil/references/workflows.md +95 -23
- package/dist/commands/analytics.d.ts +0 -131
- package/dist/commands/analytics.d.ts.map +0 -1
- package/dist/commands/analytics.js +0 -291
- package/dist/vendor/core/capabilities/analytics.d.ts +0 -187
- package/dist/vendor/core/capabilities/analytics.d.ts.map +0 -1
- package/dist/vendor/core/capabilities/analytics.js +0 -214
|
@@ -1,13 +1,59 @@
|
|
|
1
1
|
import { publicRuntimeVisibility, standardOutputModes } from "./shared.js";
|
|
2
|
+
const portfolioIdPositional = {
|
|
3
|
+
kind: "positional",
|
|
4
|
+
name: "portfolio_id",
|
|
5
|
+
type: "integer",
|
|
6
|
+
required: true,
|
|
7
|
+
placeholder: "ID",
|
|
8
|
+
description: "Stable saved object identifier.",
|
|
9
|
+
};
|
|
10
|
+
const namePositional = {
|
|
11
|
+
kind: "positional",
|
|
12
|
+
name: "name",
|
|
13
|
+
type: "string",
|
|
14
|
+
required: true,
|
|
15
|
+
placeholder: "NOME",
|
|
16
|
+
description: "Name to save.",
|
|
17
|
+
};
|
|
18
|
+
const symbolsPositional = {
|
|
19
|
+
kind: "positional",
|
|
20
|
+
name: "symbols",
|
|
21
|
+
type: "string_array",
|
|
22
|
+
required: true,
|
|
23
|
+
placeholder: "TICKER",
|
|
24
|
+
multiple: true,
|
|
25
|
+
collectionFormat: "space_separated",
|
|
26
|
+
description: "One or more monitored ticker symbols.",
|
|
27
|
+
};
|
|
28
|
+
const targetsPositional = {
|
|
29
|
+
kind: "positional",
|
|
30
|
+
name: "targets",
|
|
31
|
+
type: "string_array",
|
|
32
|
+
required: true,
|
|
33
|
+
placeholder: "TICKER:PESO",
|
|
34
|
+
multiple: true,
|
|
35
|
+
collectionFormat: "space_separated",
|
|
36
|
+
description: "One or more target weights in TICKER:WEIGHT_PCT form.",
|
|
37
|
+
};
|
|
38
|
+
const positionsPositional = {
|
|
39
|
+
kind: "positional",
|
|
40
|
+
name: "positions",
|
|
41
|
+
type: "string_array",
|
|
42
|
+
required: true,
|
|
43
|
+
placeholder: "TICKER:QUANTIDADE",
|
|
44
|
+
multiple: true,
|
|
45
|
+
collectionFormat: "space_separated",
|
|
46
|
+
description: "One or more position quantities in TICKER:QUANTITY form.",
|
|
47
|
+
};
|
|
2
48
|
export const portfolioCapabilities = [
|
|
3
49
|
{
|
|
4
|
-
id: "
|
|
50
|
+
id: "watchlists.list",
|
|
5
51
|
kind: "read",
|
|
6
52
|
visibility: publicRuntimeVisibility,
|
|
7
|
-
description: "List
|
|
53
|
+
description: "List watchlists owned by the authenticated user.",
|
|
8
54
|
http: {
|
|
9
55
|
method: "GET",
|
|
10
|
-
path: "/api/desk/tools/
|
|
56
|
+
path: "/api/desk/tools/watchlist/list",
|
|
11
57
|
inputMode: "none",
|
|
12
58
|
schemas: {
|
|
13
59
|
request: null,
|
|
@@ -15,27 +61,27 @@ export const portfolioCapabilities = [
|
|
|
15
61
|
},
|
|
16
62
|
},
|
|
17
63
|
cli: {
|
|
18
|
-
group: "
|
|
64
|
+
group: "watchlists",
|
|
19
65
|
command: "list",
|
|
20
|
-
summary: "List
|
|
66
|
+
summary: "List watchlists for tracking ideas and filters.",
|
|
21
67
|
positional: [],
|
|
22
68
|
options: [],
|
|
23
|
-
examples: ["quantbrasil
|
|
69
|
+
examples: ["quantbrasil watchlists list"],
|
|
24
70
|
},
|
|
25
71
|
tool: {
|
|
26
|
-
name: "
|
|
27
|
-
title: "List
|
|
72
|
+
name: "qb_watchlist_list",
|
|
73
|
+
title: "List watchlists",
|
|
28
74
|
},
|
|
29
75
|
outputModes: standardOutputModes,
|
|
30
76
|
},
|
|
31
77
|
{
|
|
32
|
-
id: "
|
|
78
|
+
id: "watchlists.get",
|
|
33
79
|
kind: "read",
|
|
34
80
|
visibility: publicRuntimeVisibility,
|
|
35
|
-
description: "Return one
|
|
81
|
+
description: "Return one watchlist by id, scoped to the acting user.",
|
|
36
82
|
http: {
|
|
37
83
|
method: "POST",
|
|
38
|
-
path: "/api/desk/tools/
|
|
84
|
+
path: "/api/desk/tools/watchlist/get",
|
|
39
85
|
inputMode: "json_body",
|
|
40
86
|
schemas: {
|
|
41
87
|
request: "PortfolioGetRequest",
|
|
@@ -43,36 +89,27 @@ export const portfolioCapabilities = [
|
|
|
43
89
|
},
|
|
44
90
|
},
|
|
45
91
|
cli: {
|
|
46
|
-
group: "
|
|
92
|
+
group: "watchlists",
|
|
47
93
|
command: "get",
|
|
48
|
-
summary: "Get a
|
|
49
|
-
positional: [
|
|
50
|
-
{
|
|
51
|
-
kind: "positional",
|
|
52
|
-
name: "portfolio_id",
|
|
53
|
-
type: "integer",
|
|
54
|
-
required: true,
|
|
55
|
-
placeholder: "ID",
|
|
56
|
-
description: "Saved portfolio identifier.",
|
|
57
|
-
},
|
|
58
|
-
],
|
|
94
|
+
summary: "Get a watchlist by id.",
|
|
95
|
+
positional: [portfolioIdPositional],
|
|
59
96
|
options: [],
|
|
60
|
-
examples: ["quantbrasil
|
|
97
|
+
examples: ["quantbrasil watchlists get 123"],
|
|
61
98
|
},
|
|
62
99
|
tool: {
|
|
63
|
-
name: "
|
|
64
|
-
title: "Get
|
|
100
|
+
name: "qb_watchlist_get",
|
|
101
|
+
title: "Get watchlist",
|
|
65
102
|
},
|
|
66
103
|
outputModes: standardOutputModes,
|
|
67
104
|
},
|
|
68
105
|
{
|
|
69
|
-
id: "
|
|
106
|
+
id: "watchlists.create",
|
|
70
107
|
kind: "mutation",
|
|
71
108
|
visibility: publicRuntimeVisibility,
|
|
72
|
-
description: "Create a new
|
|
109
|
+
description: "Create a new watchlist for the authenticated user.",
|
|
73
110
|
http: {
|
|
74
111
|
method: "POST",
|
|
75
|
-
path: "/api/desk/tools/
|
|
112
|
+
path: "/api/desk/tools/watchlist/create",
|
|
76
113
|
inputMode: "json_body",
|
|
77
114
|
schemas: {
|
|
78
115
|
request: "PortfolioCreateRequest",
|
|
@@ -80,36 +117,27 @@ export const portfolioCapabilities = [
|
|
|
80
117
|
},
|
|
81
118
|
},
|
|
82
119
|
cli: {
|
|
83
|
-
group: "
|
|
120
|
+
group: "watchlists",
|
|
84
121
|
command: "create",
|
|
85
|
-
summary: "Create a new
|
|
86
|
-
positional: [
|
|
87
|
-
{
|
|
88
|
-
kind: "positional",
|
|
89
|
-
name: "name",
|
|
90
|
-
type: "string",
|
|
91
|
-
required: true,
|
|
92
|
-
placeholder: "NOME",
|
|
93
|
-
description: "Portfolio name to create.",
|
|
94
|
-
},
|
|
95
|
-
],
|
|
122
|
+
summary: "Create a new watchlist.",
|
|
123
|
+
positional: [namePositional],
|
|
96
124
|
options: [],
|
|
97
|
-
examples: ['quantbrasil
|
|
125
|
+
examples: ['quantbrasil watchlists create "Dividendos"'],
|
|
98
126
|
},
|
|
99
127
|
tool: {
|
|
100
|
-
name: "
|
|
101
|
-
title: "Create
|
|
128
|
+
name: "qb_watchlist_create",
|
|
129
|
+
title: "Create watchlist",
|
|
102
130
|
},
|
|
103
131
|
outputModes: standardOutputModes,
|
|
104
132
|
},
|
|
105
133
|
{
|
|
106
|
-
id: "
|
|
134
|
+
id: "watchlists.rename",
|
|
107
135
|
kind: "mutation",
|
|
108
136
|
visibility: publicRuntimeVisibility,
|
|
109
|
-
description: "Rename a
|
|
137
|
+
description: "Rename a watchlist owned by the authenticated user.",
|
|
110
138
|
http: {
|
|
111
139
|
method: "POST",
|
|
112
|
-
path: "/api/desk/tools/
|
|
140
|
+
path: "/api/desk/tools/watchlist/rename",
|
|
113
141
|
inputMode: "json_body",
|
|
114
142
|
schemas: {
|
|
115
143
|
request: "PortfolioRenameRequest",
|
|
@@ -117,44 +145,27 @@ export const portfolioCapabilities = [
|
|
|
117
145
|
},
|
|
118
146
|
},
|
|
119
147
|
cli: {
|
|
120
|
-
group: "
|
|
148
|
+
group: "watchlists",
|
|
121
149
|
command: "rename",
|
|
122
|
-
summary: "Rename an existing
|
|
123
|
-
positional: [
|
|
124
|
-
{
|
|
125
|
-
kind: "positional",
|
|
126
|
-
name: "portfolio_id",
|
|
127
|
-
type: "integer",
|
|
128
|
-
required: true,
|
|
129
|
-
placeholder: "ID",
|
|
130
|
-
description: "Saved portfolio identifier.",
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
kind: "positional",
|
|
134
|
-
name: "name",
|
|
135
|
-
type: "string",
|
|
136
|
-
required: true,
|
|
137
|
-
placeholder: "NOME",
|
|
138
|
-
description: "New portfolio name.",
|
|
139
|
-
},
|
|
140
|
-
],
|
|
150
|
+
summary: "Rename an existing watchlist.",
|
|
151
|
+
positional: [portfolioIdPositional, namePositional],
|
|
141
152
|
options: [],
|
|
142
|
-
examples: ['quantbrasil
|
|
153
|
+
examples: ['quantbrasil watchlists rename 123 "Longo Prazo"'],
|
|
143
154
|
},
|
|
144
155
|
tool: {
|
|
145
|
-
name: "
|
|
146
|
-
title: "Rename
|
|
156
|
+
name: "qb_watchlist_rename",
|
|
157
|
+
title: "Rename watchlist",
|
|
147
158
|
},
|
|
148
159
|
outputModes: standardOutputModes,
|
|
149
160
|
},
|
|
150
161
|
{
|
|
151
|
-
id: "
|
|
162
|
+
id: "watchlists.add-assets",
|
|
152
163
|
kind: "mutation",
|
|
153
164
|
visibility: publicRuntimeVisibility,
|
|
154
|
-
description: "Add one or more monitored tickers to a
|
|
165
|
+
description: "Add one or more monitored tickers to a watchlist.",
|
|
155
166
|
http: {
|
|
156
167
|
method: "POST",
|
|
157
|
-
path: "/api/desk/tools/
|
|
168
|
+
path: "/api/desk/tools/watchlist/add_assets",
|
|
158
169
|
inputMode: "json_body",
|
|
159
170
|
schemas: {
|
|
160
171
|
request: "PortfolioAddAssetsRequest",
|
|
@@ -162,82 +173,389 @@ export const portfolioCapabilities = [
|
|
|
162
173
|
},
|
|
163
174
|
},
|
|
164
175
|
cli: {
|
|
165
|
-
group: "
|
|
176
|
+
group: "watchlists",
|
|
166
177
|
command: "add-assets",
|
|
167
|
-
summary: "Add monitored tickers to an existing
|
|
168
|
-
positional: [
|
|
178
|
+
summary: "Add monitored tickers to an existing watchlist.",
|
|
179
|
+
positional: [portfolioIdPositional, symbolsPositional],
|
|
180
|
+
options: [],
|
|
181
|
+
examples: ["quantbrasil watchlists add-assets 123 PETR4 VALE3"],
|
|
182
|
+
},
|
|
183
|
+
tool: {
|
|
184
|
+
name: "qb_watchlist_add_assets",
|
|
185
|
+
title: "Add watchlist assets",
|
|
186
|
+
},
|
|
187
|
+
outputModes: standardOutputModes,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "watchlists.remove-assets",
|
|
191
|
+
kind: "mutation",
|
|
192
|
+
visibility: publicRuntimeVisibility,
|
|
193
|
+
description: "Remove one or more monitored tickers from a watchlist.",
|
|
194
|
+
http: {
|
|
195
|
+
method: "POST",
|
|
196
|
+
path: "/api/desk/tools/watchlist/remove_assets",
|
|
197
|
+
inputMode: "json_body",
|
|
198
|
+
schemas: {
|
|
199
|
+
request: "PortfolioRemoveAssetsRequest",
|
|
200
|
+
response: "PortfolioMutationResponse",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
cli: {
|
|
204
|
+
group: "watchlists",
|
|
205
|
+
command: "remove-assets",
|
|
206
|
+
summary: "Remove monitored tickers from an existing watchlist.",
|
|
207
|
+
positional: [portfolioIdPositional, symbolsPositional],
|
|
208
|
+
options: [],
|
|
209
|
+
examples: ["quantbrasil watchlists remove-assets 123 PETR4"],
|
|
210
|
+
},
|
|
211
|
+
tool: {
|
|
212
|
+
name: "qb_watchlist_remove_assets",
|
|
213
|
+
title: "Remove watchlist assets",
|
|
214
|
+
},
|
|
215
|
+
outputModes: standardOutputModes,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: "holdings.list",
|
|
219
|
+
kind: "read",
|
|
220
|
+
visibility: publicRuntimeVisibility,
|
|
221
|
+
description: "List holdings owned by the authenticated user.",
|
|
222
|
+
http: {
|
|
223
|
+
method: "GET",
|
|
224
|
+
path: "/api/desk/tools/holding/list",
|
|
225
|
+
inputMode: "none",
|
|
226
|
+
schemas: {
|
|
227
|
+
request: null,
|
|
228
|
+
response: "PortfolioListResponse",
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
cli: {
|
|
232
|
+
group: "holdings",
|
|
233
|
+
command: "list",
|
|
234
|
+
summary: "List holdings for investable metrics.",
|
|
235
|
+
positional: [],
|
|
236
|
+
options: [],
|
|
237
|
+
examples: ["quantbrasil holdings list"],
|
|
238
|
+
},
|
|
239
|
+
tool: {
|
|
240
|
+
name: "qb_holding_list",
|
|
241
|
+
title: "List holdings",
|
|
242
|
+
},
|
|
243
|
+
outputModes: standardOutputModes,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: "holdings.get",
|
|
247
|
+
kind: "read",
|
|
248
|
+
visibility: publicRuntimeVisibility,
|
|
249
|
+
description: "Return one holding by id, scoped to the acting user.",
|
|
250
|
+
http: {
|
|
251
|
+
method: "POST",
|
|
252
|
+
path: "/api/desk/tools/holding/get",
|
|
253
|
+
inputMode: "json_body",
|
|
254
|
+
schemas: {
|
|
255
|
+
request: "PortfolioGetRequest",
|
|
256
|
+
response: "PortfolioGetResponse",
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
cli: {
|
|
260
|
+
group: "holdings",
|
|
261
|
+
command: "get",
|
|
262
|
+
summary: "Get a holding by id.",
|
|
263
|
+
positional: [portfolioIdPositional],
|
|
264
|
+
options: [],
|
|
265
|
+
examples: ["quantbrasil holdings get 123"],
|
|
266
|
+
},
|
|
267
|
+
tool: {
|
|
268
|
+
name: "qb_holding_get",
|
|
269
|
+
title: "Get holding",
|
|
270
|
+
},
|
|
271
|
+
outputModes: standardOutputModes,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: "holdings.create",
|
|
275
|
+
kind: "mutation",
|
|
276
|
+
visibility: publicRuntimeVisibility,
|
|
277
|
+
description: "Create a new holding for the authenticated user.",
|
|
278
|
+
http: {
|
|
279
|
+
method: "POST",
|
|
280
|
+
path: "/api/desk/tools/holding/create",
|
|
281
|
+
inputMode: "json_body",
|
|
282
|
+
schemas: {
|
|
283
|
+
request: "DeskHoldingCreateRequest",
|
|
284
|
+
response: "PortfolioCreateResponse",
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
cli: {
|
|
288
|
+
group: "holdings",
|
|
289
|
+
command: "create",
|
|
290
|
+
summary: "Create a new holding.",
|
|
291
|
+
positional: [namePositional],
|
|
292
|
+
options: [
|
|
169
293
|
{
|
|
170
|
-
kind: "
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
294
|
+
kind: "option",
|
|
295
|
+
flag: "--mode",
|
|
296
|
+
name: "default_allocation_input",
|
|
297
|
+
type: "enum",
|
|
298
|
+
required: false,
|
|
299
|
+
placeholder: "target|position",
|
|
300
|
+
defaultValue: "target",
|
|
301
|
+
enumValues: ["target", "position"],
|
|
302
|
+
description: "How the holding is controlled initially: target weights or positions.",
|
|
176
303
|
},
|
|
177
304
|
{
|
|
178
|
-
kind: "
|
|
179
|
-
|
|
305
|
+
kind: "option",
|
|
306
|
+
flag: "--target",
|
|
307
|
+
name: "targets",
|
|
180
308
|
type: "string_array",
|
|
181
|
-
required:
|
|
182
|
-
placeholder: "TICKER",
|
|
309
|
+
required: false,
|
|
310
|
+
placeholder: "TICKER:PESO",
|
|
183
311
|
multiple: true,
|
|
184
|
-
collectionFormat: "
|
|
185
|
-
description: "
|
|
312
|
+
collectionFormat: "repeatable",
|
|
313
|
+
description: "Initial target weight in TICKER:WEIGHT_PCT form.",
|
|
186
314
|
},
|
|
187
315
|
],
|
|
316
|
+
examples: [
|
|
317
|
+
'quantbrasil holdings create "Longo Prazo"',
|
|
318
|
+
'quantbrasil holdings create "Teórica" --target PRIO3:50 --target VALE3:50',
|
|
319
|
+
'quantbrasil holdings create "Real" --mode position',
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
tool: {
|
|
323
|
+
name: "qb_holding_create",
|
|
324
|
+
title: "Create holding",
|
|
325
|
+
},
|
|
326
|
+
outputModes: standardOutputModes,
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "holdings.rename",
|
|
330
|
+
kind: "mutation",
|
|
331
|
+
visibility: publicRuntimeVisibility,
|
|
332
|
+
description: "Rename a holding owned by the authenticated user.",
|
|
333
|
+
http: {
|
|
334
|
+
method: "POST",
|
|
335
|
+
path: "/api/desk/tools/holding/rename",
|
|
336
|
+
inputMode: "json_body",
|
|
337
|
+
schemas: {
|
|
338
|
+
request: "PortfolioRenameRequest",
|
|
339
|
+
response: "PortfolioMutationResponse",
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
cli: {
|
|
343
|
+
group: "holdings",
|
|
344
|
+
command: "rename",
|
|
345
|
+
summary: "Rename an existing holding.",
|
|
346
|
+
positional: [portfolioIdPositional, namePositional],
|
|
188
347
|
options: [],
|
|
189
|
-
examples: [
|
|
348
|
+
examples: ['quantbrasil holdings rename 123 "Longo Prazo"'],
|
|
190
349
|
},
|
|
191
350
|
tool: {
|
|
192
|
-
name: "
|
|
193
|
-
title: "
|
|
351
|
+
name: "qb_holding_rename",
|
|
352
|
+
title: "Rename holding",
|
|
194
353
|
},
|
|
195
354
|
outputModes: standardOutputModes,
|
|
196
355
|
},
|
|
197
356
|
{
|
|
198
|
-
id: "
|
|
357
|
+
id: "holdings.set-targets",
|
|
199
358
|
kind: "mutation",
|
|
200
359
|
visibility: publicRuntimeVisibility,
|
|
201
|
-
description: "
|
|
360
|
+
description: "Set target weights for a holding owned by the authenticated user.",
|
|
202
361
|
http: {
|
|
203
362
|
method: "POST",
|
|
204
|
-
path: "/api/desk/tools/
|
|
363
|
+
path: "/api/desk/tools/holding/set_targets",
|
|
205
364
|
inputMode: "json_body",
|
|
206
365
|
schemas: {
|
|
207
|
-
request: "
|
|
366
|
+
request: "HoldingSetTargetsRequest",
|
|
208
367
|
response: "PortfolioMutationResponse",
|
|
209
368
|
},
|
|
210
369
|
},
|
|
211
370
|
cli: {
|
|
212
|
-
group: "
|
|
213
|
-
command: "
|
|
214
|
-
summary: "
|
|
215
|
-
positional: [
|
|
371
|
+
group: "holdings",
|
|
372
|
+
command: "set-targets",
|
|
373
|
+
summary: "Set target weights for a holding.",
|
|
374
|
+
positional: [portfolioIdPositional, targetsPositional],
|
|
375
|
+
options: [],
|
|
376
|
+
examples: ["quantbrasil holdings set-targets 123 PRIO3:50 VALE3:50"],
|
|
377
|
+
},
|
|
378
|
+
tool: {
|
|
379
|
+
name: "qb_holding_set_targets",
|
|
380
|
+
title: "Set holding target weights",
|
|
381
|
+
},
|
|
382
|
+
outputModes: standardOutputModes,
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: "holdings.set-positions",
|
|
386
|
+
kind: "mutation",
|
|
387
|
+
visibility: publicRuntimeVisibility,
|
|
388
|
+
description: "Set position quantities for a holding owned by the authenticated user.",
|
|
389
|
+
http: {
|
|
390
|
+
method: "POST",
|
|
391
|
+
path: "/api/desk/tools/holding/set_positions",
|
|
392
|
+
inputMode: "json_body",
|
|
393
|
+
schemas: {
|
|
394
|
+
request: "HoldingSetPositionsRequest",
|
|
395
|
+
response: "PortfolioMutationResponse",
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
cli: {
|
|
399
|
+
group: "holdings",
|
|
400
|
+
command: "set-positions",
|
|
401
|
+
summary: "Set position quantities for a holding.",
|
|
402
|
+
positional: [portfolioIdPositional, positionsPositional],
|
|
403
|
+
options: [],
|
|
404
|
+
examples: [
|
|
405
|
+
"quantbrasil holdings set-positions 123 PRIO3:1600 BTC-USD:0.25",
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
tool: {
|
|
409
|
+
name: "qb_holding_set_positions",
|
|
410
|
+
title: "Set holding position quantities",
|
|
411
|
+
},
|
|
412
|
+
outputModes: standardOutputModes,
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "holdings.historical-return",
|
|
416
|
+
kind: "read",
|
|
417
|
+
visibility: publicRuntimeVisibility,
|
|
418
|
+
description: "Calculate historical return for a holding.",
|
|
419
|
+
http: {
|
|
420
|
+
method: "POST",
|
|
421
|
+
path: "/api/desk/tools/holding/historical_return",
|
|
422
|
+
inputMode: "json_body",
|
|
423
|
+
schemas: {
|
|
424
|
+
request: "PortfolioHistoricalReturnRequest",
|
|
425
|
+
response: "HistoricalReturnResponse",
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
cli: {
|
|
429
|
+
group: "holdings",
|
|
430
|
+
command: "historical-return",
|
|
431
|
+
summary: "Calculate historical return for a saved holding.",
|
|
432
|
+
positional: [portfolioIdPositional],
|
|
433
|
+
options: [
|
|
434
|
+
{
|
|
435
|
+
kind: "option",
|
|
436
|
+
flag: "--from",
|
|
437
|
+
name: "start_date",
|
|
438
|
+
type: "string",
|
|
439
|
+
required: false,
|
|
440
|
+
placeholder: "AAAA-MM-DD",
|
|
441
|
+
description: "Inclusive start date in ISO format. Use with --to, or use --period.",
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
kind: "option",
|
|
445
|
+
flag: "--to",
|
|
446
|
+
name: "end_date",
|
|
447
|
+
type: "string",
|
|
448
|
+
required: false,
|
|
449
|
+
placeholder: "AAAA-MM-DD",
|
|
450
|
+
description: "Inclusive end date in ISO format. Use with --from, or use --period.",
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
kind: "option",
|
|
454
|
+
flag: "--period",
|
|
455
|
+
name: "period",
|
|
456
|
+
type: "string",
|
|
457
|
+
required: false,
|
|
458
|
+
placeholder: "PERIODO",
|
|
459
|
+
description: "Lookback period such as 1y, 3y, 5y, or 6m. Mutually exclusive with --from/--to.",
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
examples: [
|
|
463
|
+
"quantbrasil holdings historical-return 123 --from 2024-01-01 --to 2025-01-01",
|
|
464
|
+
"quantbrasil holdings historical-return 123 --period 1y",
|
|
465
|
+
],
|
|
466
|
+
},
|
|
467
|
+
tool: {
|
|
468
|
+
name: "qb_holding_historical_return",
|
|
469
|
+
title: "Calculate holding historical return",
|
|
470
|
+
},
|
|
471
|
+
outputModes: standardOutputModes,
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: "holdings.beta",
|
|
475
|
+
kind: "read",
|
|
476
|
+
visibility: publicRuntimeVisibility,
|
|
477
|
+
description: "Calculate holding beta against IBOV.",
|
|
478
|
+
http: {
|
|
479
|
+
method: "POST",
|
|
480
|
+
path: "/api/desk/tools/holding/beta",
|
|
481
|
+
inputMode: "json_body",
|
|
482
|
+
schemas: {
|
|
483
|
+
request: "PortfolioBetaRequest",
|
|
484
|
+
response: "PortfolioBetaResponse",
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
cli: {
|
|
488
|
+
group: "holdings",
|
|
489
|
+
command: "beta",
|
|
490
|
+
summary: "Calculate holding beta against IBOV.",
|
|
491
|
+
positional: [portfolioIdPositional],
|
|
492
|
+
options: [
|
|
493
|
+
{
|
|
494
|
+
kind: "option",
|
|
495
|
+
flag: "--years",
|
|
496
|
+
name: "years",
|
|
497
|
+
type: "enum",
|
|
498
|
+
required: false,
|
|
499
|
+
placeholder: "ANOS",
|
|
500
|
+
defaultValue: 1,
|
|
501
|
+
enumValues: ["1", "3", "5"],
|
|
502
|
+
description: "Historical lookback window in years. Accepted values: 1, 3, or 5.",
|
|
503
|
+
},
|
|
504
|
+
],
|
|
505
|
+
examples: ["quantbrasil holdings beta 123 --years 3"],
|
|
506
|
+
},
|
|
507
|
+
tool: {
|
|
508
|
+
name: "qb_holding_beta",
|
|
509
|
+
title: "Calculate holding beta",
|
|
510
|
+
},
|
|
511
|
+
outputModes: standardOutputModes,
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: "holdings.var",
|
|
515
|
+
kind: "read",
|
|
516
|
+
visibility: publicRuntimeVisibility,
|
|
517
|
+
description: "Calculate one-day Value-at-Risk for a holding.",
|
|
518
|
+
http: {
|
|
519
|
+
method: "POST",
|
|
520
|
+
path: "/api/desk/tools/holding/var",
|
|
521
|
+
inputMode: "json_body",
|
|
522
|
+
schemas: {
|
|
523
|
+
request: "PortfolioVaRRequest",
|
|
524
|
+
response: "PortfolioVaRResponse",
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
cli: {
|
|
528
|
+
group: "holdings",
|
|
529
|
+
command: "var",
|
|
530
|
+
summary: "Calculate one-day Value-at-Risk for a holding.",
|
|
531
|
+
positional: [portfolioIdPositional],
|
|
532
|
+
options: [
|
|
216
533
|
{
|
|
217
|
-
kind: "
|
|
218
|
-
|
|
534
|
+
kind: "option",
|
|
535
|
+
flag: "--years",
|
|
536
|
+
name: "years",
|
|
219
537
|
type: "integer",
|
|
220
|
-
required:
|
|
221
|
-
placeholder: "
|
|
222
|
-
|
|
538
|
+
required: false,
|
|
539
|
+
placeholder: "ANOS",
|
|
540
|
+
defaultValue: 1,
|
|
541
|
+
description: "Historical lookback window in years. The VaR horizon remains one day.",
|
|
223
542
|
},
|
|
224
543
|
{
|
|
225
|
-
kind: "
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
description: "
|
|
544
|
+
kind: "option",
|
|
545
|
+
flag: "--confidence",
|
|
546
|
+
name: "confidence_pct",
|
|
547
|
+
type: "number",
|
|
548
|
+
required: false,
|
|
549
|
+
placeholder: "PERCENTUAL",
|
|
550
|
+
defaultValue: 95,
|
|
551
|
+
description: "Confidence level in percent, for example 95 or 99.",
|
|
233
552
|
},
|
|
234
553
|
],
|
|
235
|
-
|
|
236
|
-
examples: ["quantbrasil portfolios remove-assets 123 PETR4"],
|
|
554
|
+
examples: ["quantbrasil holdings var 123 --years 1 --confidence 95"],
|
|
237
555
|
},
|
|
238
556
|
tool: {
|
|
239
|
-
name: "
|
|
240
|
-
title: "
|
|
557
|
+
name: "qb_holding_var",
|
|
558
|
+
title: "Calculate holding VaR",
|
|
241
559
|
},
|
|
242
560
|
outputModes: standardOutputModes,
|
|
243
561
|
},
|