從 SEC 的 EDGAR 定期下載所有新的 10-K 文件的最有效方法是什麼?

  • June 29, 2020

我發現這個網站使用 perl 腳本來下載所有文件。它指出:“有 200K+ 10-K(和等量的)文件,這將需要相當多的硬碟空間和時間來下載。SEC 更喜歡在‘安靜時間’(即正常交易時間之外)進行批量下載。 "

有沒有比向 SEC 的伺服器發出請求以獲取此資訊更好的方法?

10-K - 僅歷史基本面

如果您只對 10-Ks 的基本面(損益表、資產負債表、現金流量表)感興趣,那麼您可以使用提供商eodhistoricaldata.com。我是付費客戶,每天都使用他們的 API。訪問 37K 股票(全球)、6K ETF 和 20K 共同基金的基本面價格為每月 10 美元。

你可以使用getFundamentals(ticker)庫提供的方法eodhistoricaldata-apihttps://www.npmjs.com/package/eodhistoricaldata-api),或者直接訪問他們的 RESTful API。

您可以通過程式方式訪問 API,而無需一次下載所有報告。

API 返回 JSON 數據,例如:

"Highlights": {
   "MarketCapitalization": 54915055616,
   "MarketCapitalizationMln": "54915.0556",
   "EBITDA": 616286976,
   "PERatio": null,
   "PEGRatio": "-1.5700",
   "WallStreetTargetPrice": "321.8900",
   "BookValue": "26.2790",
   "DividendShare": null,
   "DividendYield": null,
   "EarningsShare": "-4.8500",
   "EPSEstimateCurrentYear": "-6.5600",
   "EPSEstimateNextYear": "-2.0000",
   "EPSEstimateNextQuarter": "-1.6700",
   "MostRecentQuarter": "2018-09-30",
   "ProfitMargin": "-0.1022",
   "OperatingMarginTTM": "-0.0710",
   "ReturnOnAssetsTTM": "-0.0271",
   "ReturnOnEquityTTM": "-0.3397",
   "RevenueTTM": "17523644416.00",
   "RevenuePerShareTTM": "103.3240",
   "QuarterlyRevenueGrowthYOY": "1.2860",
   "GrossProfitTTM": "2222487000.00",
   "DilutedEpsTTM": "-10.5600",
   "QuarterlyEarningsGrowthYOY": null
},
// ...
"Income_Statement": {
       "currency_symbol": "USD",
       "quarterly": {
           "2018-09-30": {
               "date": "2018-09-30",
               "filing_date": "2018-11-02",
               "researchDevelopment": "350848000.00",
               "effectOfAccountingCharges": null,
               "incomeBeforeTax": "271320000.00",
               "minorityInterest": "1344731000.00",
               "netIncome": "311516000.00",
               "sellingGeneralAdministrative": "729876000.00",
               "grossProfit": "1523665000.00",
               "ebit": "442941000.00",
               "operatingIncome": "442941000.00",
               "otherOperatingExpenses": null,
               "interestExpense": "-169858000.00",
               "extraordinaryItems": null,
               "nonRecurring": null,
               "otherItems": null,
               "incomeTaxExpense": "16647000.00",
               "totalRevenue": "6824413000.00",
               "totalOperatingExpenses": "6381472000.00",
               "costOfRevenue": "5300748000.00",
               "totalOtherIncomeExpenseNet": "-171621000.00",
               "discontinuedOperations": null,
               "netIncomeFromContinuingOps": "254673000.00",
               "netIncomeApplicableToCommonShares": "311516000.00"
           },
           // ...
"Balance_Sheet": {
       "currency_symbol": "USD",
       "quarterly": {
           "2018-09-30": {
               "date": "2018-09-30",
               "filing_date": "2018-11-02",
               "intangibleAssets": "291476000.00",
               "totalLiab": "23409144000.00",
               "totalStockholderEquity": "4508838000.00",
               "deferredLongTermLiab": "0.00",
               "otherCurrentLiab": "2266778000.00",
               "totalAssets": "29262713000.00",
               "commonStock": "171000.00",
               "otherCurrentAssets": "158627000.00",
               "retainedEarnings": "-5457315000.00",
               "otherLiab": "2285172000.00",
               "goodWill": "65226000.00",
               "otherAssets": "1233979000.00",
               "cash": "2967504000.00",
               "totalCurrentLiabilities": "9775324000.00",
               "shortLongTermDebt": "2106538000.00",
               "otherStockholderEquity": "8271000.00",
               "propertyPlantEquipment": "19733969000.00",
               "totalCurrentAssets": "7920491000.00",
               "longTermInvestments": "17572000.00",
               "netTangibleAssets": "4152136000.00",
               "shortTermInvestments": "0.00",
               "netReceivables": "1155001000.00",
               "longTermDebt": "9726589000.00",
               "inventory": "3314127000.00",
               "accountsPayable": "3596984000.00",
               "totalPermanentEquity": "0.00",
               "noncontrollingInterestInConsolidatedEntity": "0.00",
               "temporaryEquityRedeemableNoncontrollingInterests": "0.00",
               "accumulatedOtherComprehensiveIncome": "0.00",
               "additionalPaidInCapital": "0.00",
               "commonStockTotalEquity": "0.00",
               "preferredStockTotalEquity": "0.00",
               "retainedEarningsTotalEquity": "0.00",
               "treasuryStock": "0.00"
           },
           // ...
"Cash_Flow": {
       "currency_symbol": "USD",
       "quarterly": {
           "2018-09-30": {
               "date": "2018-09-30",
               "filing_date": "2018-11-02",
               "investments": null,
               "changeToLiabilities": "895197000.00",
               "totalCashflowsFromInvestingActivities": "-560965000.00",
               "netBorrowings": "-221931000.00",
               "totalCashFromFinancingActivities": "-84218000.00",
               "changeToOperatingActivities": "98770000.00",
               "netIncome": "311516000.00",
               "changeInCash": "739728000.00",
               "totalCashFromOperatingActivities": "1391281000.00",
               "depreciation": "502825000.00",
               "otherCashflowsFromInvestingActivities": "128600000.00",
               "dividendsPaid": "0.00",
               "changeToInventory": "-55055000.00",
               "changeToAccountReceivables": "-587594000.00",
               "salePurchaseOfStock": "0.00",
               "otherCashflowsFromFinancingActivities": "42839000.00",
               "changeToNetincome": "179168000.00",
               "capitalExpenditures": "-559765000.00"
           },

10-K - 實時

如果您需要實時訪問 10-K 文件,我建議sec-api( https://www.npmjs.com/package/sec-api )。它提供了一個 websocket(實時)通道。一旦在 sec.gov EDGAR 上發布了新文件,圖書館就會觸發一個事件,並返回有關新文件的資訊,如下所示(JSON 格式):

{  
 companyName:            'WALT DISNEY CO/ (0001001039) (Issuer)',  
 cik:                    '0001001039',
 type:                   '10-K',  
 description:            'FORM 10-K',  
 linkToFilingDetails:    'https://www.sec.gov/...',  
 linkToHtmlAnnouncement: 'https://www.sec.gov/...',  
 linkToXbrl:             'https://www.sec.gov/...',  
 announcedAt:            '2018-12-21T20:02:07-05:00'
}

該庫適用於伺服器端(例如 Node.js)和客戶端(例如 React、React Native、Angular、Vue)JavaScript。

簡單的 Node.js 實現:

const api = require('sec-api')(); 
api.on('filing', filing => console.log(filing));

我在 python 中為 EDGAR 編寫了一個數據探勘包。它接受股票程式碼列表作為輸入,因此您無需為每家公司下載每 10-k 行情。只是你想要的。希望能幫助到你!

https://github.com/Jordan-M-Young/pyQuarry

引用自:https://quant.stackexchange.com/questions/17558