Esempio n. 1
0
 def test_GOOG_shareholders_equity(self):
     sec_value = 994.77
     doc_path = tests.asset_file_path('goog-20120630.xml')
     xbrl_document = XBRLDocument.gets_XBRL_locally(file_path=doc_path)
     filing = Filing(filing_date=None, document=xbrl_document, next_filing=None)
     book_value_per_share = BookValuePerShare.value_from_filing(filing)
     self.assertAlmostEqual(book_value_per_share, sec_value, places=1)
 def test_GOOG_shareholders_equity(self):
     sec_value = 994.77
     doc_path = os.path.join(TEST_DOCS_DIR, 'goog-20120630.xml')
     xbrl_document = XBRLDocument.gets_XBRL_locally(file_path=doc_path)
     filing = Filing(filing_date=None, document=xbrl_document, next_filing=None)
     book_value_per_share = BookValuePerShare.value_from_filing(filing)
     self.assertAlmostEqual(book_value_per_share, sec_value, places=1)
 def test_appl(self):
     """value computed from http://www.sec.gov/cgi-bin/viewer?action=view&cik=320193&accession_number=0001193125-13-022339&xbrl_type=v#.
     
     """
     sec_value = 135.6
     doc_path = os.path.join(TEST_DOCS_DIR, "aapl-20121229.xml")
     xbrl_document = XBRLDocument.gets_XBRL_locally(file_path=doc_path)
     filing = Filing(filing_date=None, document=xbrl_document, next_filing=None)
     book_value_per_share = BookValuePerShare.value_from_filing(filing)
     self.assertAlmostEqual(book_value_per_share, sec_value, places=1)
Esempio n. 4
0
 def test_appl(self):
     '''value computed from http://www.sec.gov/cgi-bin/viewer?action=view&cik=320193&accession_number=0001193125-13-022339&xbrl_type=v#.
     
     '''
     sec_value = 135.6
     doc_path = tests.asset_file_path('aapl-20121229.xml')
     xbrl_document = XBRLDocument.gets_XBRL_locally(file_path=doc_path)
     filing = Filing(filing_date=None, document=xbrl_document, next_filing=None)
     book_value_per_share = BookValuePerShare.value_from_filing(filing)
     self.assertAlmostEqual(book_value_per_share, sec_value, places=1)
import pandas as pd
import financial_fundamentals.edgar as edgar
from financial_fundamentals.accounting_metrics import BookValuePerShare

date_range = pd.date_range('2019-10-18', '2019-10-18')
ticker = [
    "AMZN", "TSLA", "MSFT", "GOOG", "F", "ORCL", "AAPL", "WFC", "TOL", "BA",
    "NKE"
]
# ticker = ["AMZN"]

required_data = pd.DataFrame(columns=ticker, index=date_range)
for each_symbol in ticker:
    print(each_symbol)
    filings = edgar.get_filings(symbol=each_symbol, filing_type='10-Q')[-1]
    book_value_per_share = BookValuePerShare.value_from_filing(filings)
    print(book_value_per_share)