reportify-sdk 0.3.1__tar.gz → 0.3.2__tar.gz
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.
- {reportify_sdk-0.3.1/reportify_sdk.egg-info → reportify_sdk-0.3.2}/PKG-INFO +1 -1
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/pyproject.toml +1 -1
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/__init__.py +1 -1
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/client.py +1 -1
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/quant.py +0 -57
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2/reportify_sdk.egg-info}/PKG-INFO +1 -1
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/LICENSE +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/README.md +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/agent.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/channels.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/chat.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/concepts.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/docs.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/exceptions.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/kb.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/search.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/stock.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/timeline.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk/user.py +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk.egg-info/SOURCES.txt +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk.egg-info/dependency_links.txt +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk.egg-info/requires.txt +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/reportify_sdk.egg-info/top_level.txt +0 -0
- {reportify_sdk-0.3.1 → reportify_sdk-0.3.2}/setup.cfg +0 -0
|
@@ -315,63 +315,6 @@ class QuantModule:
|
|
|
315
315
|
response = self._client._post("/v1/quant/quotes/ohlcv/batch", json=data)
|
|
316
316
|
return self._to_dataframe(response.get("datas", []))
|
|
317
317
|
|
|
318
|
-
# -------------------------------------------------------------------------
|
|
319
|
-
# Financials
|
|
320
|
-
# -------------------------------------------------------------------------
|
|
321
|
-
|
|
322
|
-
def financials(
|
|
323
|
-
self,
|
|
324
|
-
financial_type: Literal["income", "cashflow", "balancesheet", "equity"],
|
|
325
|
-
symbol: str,
|
|
326
|
-
*,
|
|
327
|
-
market: StockMarket = "cn",
|
|
328
|
-
start_year: int | None = None,
|
|
329
|
-
end_year: int | None = None,
|
|
330
|
-
) -> pd.DataFrame:
|
|
331
|
-
"""
|
|
332
|
-
Get historical financial statement data for a single symbol
|
|
333
|
-
|
|
334
|
-
Args:
|
|
335
|
-
financial_type: Type of financial statement
|
|
336
|
-
- "income": Income statement (利润表)
|
|
337
|
-
- "cashflow": Cash flow statement (现金流量表)
|
|
338
|
-
- "balancesheet": Balance sheet (资产负债表)
|
|
339
|
-
- "equity": Equity statement (股东权益变动表)
|
|
340
|
-
symbol: Stock code
|
|
341
|
-
market: Stock market ("cn", "hk", "us"), default "cn"
|
|
342
|
-
start_year: Start year (default: 3 years ago)
|
|
343
|
-
end_year: End year (default: current year)
|
|
344
|
-
|
|
345
|
-
Returns:
|
|
346
|
-
DataFrame with financial data sorted by report period
|
|
347
|
-
|
|
348
|
-
Example:
|
|
349
|
-
>>> # Get income statement
|
|
350
|
-
>>> df = client.quant.financials("income", "000001")
|
|
351
|
-
>>> print(df[["report_period", "revenue", "net_profit"]])
|
|
352
|
-
|
|
353
|
-
>>> # Get balance sheet for specific years
|
|
354
|
-
>>> df = client.quant.financials(
|
|
355
|
-
... "balancesheet", "600519",
|
|
356
|
-
... start_year=2020,
|
|
357
|
-
... end_year=2024
|
|
358
|
-
... )
|
|
359
|
-
|
|
360
|
-
>>> # Get cash flow statement for HK stock
|
|
361
|
-
>>> df = client.quant.financials("cashflow", "00700", market="hk")
|
|
362
|
-
"""
|
|
363
|
-
params: dict[str, Any] = {
|
|
364
|
-
"symbol": symbol,
|
|
365
|
-
"market": market,
|
|
366
|
-
}
|
|
367
|
-
if start_year:
|
|
368
|
-
params["start_year"] = start_year
|
|
369
|
-
if end_year:
|
|
370
|
-
params["end_year"] = end_year
|
|
371
|
-
|
|
372
|
-
response = self._client._get(f"/v1/quant/financials/{financial_type}", params=params)
|
|
373
|
-
return self._to_dataframe(response.get("datas", []))
|
|
374
|
-
|
|
375
318
|
# -------------------------------------------------------------------------
|
|
376
319
|
# Backtest
|
|
377
320
|
# -------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|