diff --git a/data_generation.ipynb b/data_generation.ipynb
new file mode 100644
index 0000000..2b7c53d
--- /dev/null
+++ b/data_generation.ipynb
@@ -0,0 +1,399 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Rank | \n",
+ " Name | \n",
+ " Symbol | \n",
+ " marketcap | \n",
+ " price (USD) | \n",
+ " country | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 1 | \n",
+ " Apple | \n",
+ " AAPL | \n",
+ " 2613550252032 | \n",
+ " 160.15 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 2 | \n",
+ " Microsoft | \n",
+ " MSFT | \n",
+ " 2075883208704 | \n",
+ " 276.90 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 3 | \n",
+ " Alphabet (Google) | \n",
+ " GOOG | \n",
+ " 1608236793856 | \n",
+ " 2432.90 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 4 | \n",
+ " Amazon | \n",
+ " AMZN | \n",
+ " 1463749312512 | \n",
+ " 2878.34 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 5 | \n",
+ " Tesla | \n",
+ " TSLA | \n",
+ " 1029417271296 | \n",
+ " 996.04 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 730 | \n",
+ " 731 | \n",
+ " Jump Networks | \n",
+ " JUMPNET.NS | \n",
+ " 11669324 | \n",
+ " 0.12 | \n",
+ " India | \n",
+ "
\n",
+ " \n",
+ " 731 | \n",
+ " 732 | \n",
+ " Cemtrex | \n",
+ " CETX | \n",
+ " 10846338 | \n",
+ " 0.44 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 732 | \n",
+ " 733 | \n",
+ " Pareteum Corporation | \n",
+ " TEUM | \n",
+ " 1426969 | \n",
+ " 0.01 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 733 | \n",
+ " 734 | \n",
+ " Justworks | \n",
+ " JW | \n",
+ " 0 | \n",
+ " 0.00 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ " 734 | \n",
+ " 735 | \n",
+ " Rhodium Enterprises | \n",
+ " RHDM | \n",
+ " 0 | \n",
+ " 0.00 | \n",
+ " United States | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
735 rows × 6 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Rank Name Symbol marketcap price (USD) \\\n",
+ "0 1 Apple AAPL 2613550252032 160.15 \n",
+ "1 2 Microsoft MSFT 2075883208704 276.90 \n",
+ "2 3 Alphabet (Google) GOOG 1608236793856 2432.90 \n",
+ "3 4 Amazon AMZN 1463749312512 2878.34 \n",
+ "4 5 Tesla TSLA 1029417271296 996.04 \n",
+ ".. ... ... ... ... ... \n",
+ "730 731 Jump Networks JUMPNET.NS 11669324 0.12 \n",
+ "731 732 Cemtrex CETX 10846338 0.44 \n",
+ "732 733 Pareteum Corporation TEUM 1426969 0.01 \n",
+ "733 734 Justworks JW 0 0.00 \n",
+ "734 735 Rhodium Enterprises RHDM 0 0.00 \n",
+ "\n",
+ " country \n",
+ "0 United States \n",
+ "1 United States \n",
+ "2 United States \n",
+ "3 United States \n",
+ "4 United States \n",
+ ".. ... \n",
+ "730 India \n",
+ "731 United States \n",
+ "732 United States \n",
+ "733 United States \n",
+ "734 United States \n",
+ "\n",
+ "[735 rows x 6 columns]"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import pandas as pd\n",
+ "import numpy as np\n",
+ "import yfinance as yf\n",
+ "import os\n",
+ "from tqdm import tqdm\n",
+ "\n",
+ "tech_sector = pd.read_csv(\"Data/tech_sector.csv\")\n",
+ "tech_sector"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'c:\\\\Users\\\\brian\\\\projects\\\\factor_models\\\\Data/Raw'"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "parent_dir = os.path.join(os.getcwd() , \"Data/Raw\")\n",
+ "parent_dir"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 36%|███▌ | 263/735 [50:34<1:29:50, 11.42s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- TIXT: CircuitBreaker 'redis' is OPEN and does not permit further calls\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 65%|██████▌ | 479/735 [1:31:30<50:07, 11.75s/it] "
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- 112040.KQ: No data found for this date range, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 84%|████████▍ | 621/735 [1:58:49<22:47, 12.00s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- CSLT: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 86%|████████▌ | 631/735 [1:59:37<08:25, 4.86s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- CSPR: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 91%|█████████ | 668/735 [2:02:28<05:09, 4.62s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- TRIT: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " 99%|█████████▉| 730/735 [2:07:05<00:21, 4.31s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- JUMPNET.NS: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|█████████▉| 733/735 [2:07:19<00:09, 4.56s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- JW: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|█████████▉| 734/735 [2:07:25<00:04, 4.87s/it]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "- RHDM: No data found, symbol may be delisted\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|██████████| 735/735 [2:07:31<00:00, 10.41s/it]\n"
+ ]
+ }
+ ],
+ "source": [
+ "#grab the stock off of yahoo\n",
+ "for index, row in tqdm(tech_sector.iterrows(), total=len(tech_sector)):\n",
+ " stock = yf.Ticker(row[\"Symbol\"])\n",
+ "\n",
+ " #get the stocks return history\n",
+ " path = os.path.join(parent_dir, row[\"Symbol\"])\n",
+ " if not(os.path.isdir(path)):\n",
+ " os.mkdir(path)\n",
+ "\n",
+ " #put the data regarding the stock into this folder\n",
+ " stock_prices = stock.history(period=\"max\")\n",
+ " stock_prices.to_csv(path + \"/stock_prices.csv\")\n",
+ "\n",
+ " #put the fundemental data into the folder\n",
+ " stock_balance_sheet = stock.quarterly_balance_sheet\n",
+ " stock_balance_sheet.to_csv(path + \"/stock_balance_sheet.csv\")\n",
+ "\n",
+ " stock_sustainability = stock.sustainability\n",
+ " \n",
+ " if stock_sustainability is not None:\n",
+ " stock_sustainability.to_csv(path + \"/sustainability.csv\")\n",
+ "\n",
+ " stock_finacials = stock.quarterly_financials\n",
+ " stock_finacials.to_csv(path + \"/financials.csv\")\n",
+ "\n",
+ " stock_cashflow = stock.quarterly_cashflow\n",
+ " stock_cashflow.to_csv(path + \"/cashflow.csv\")\n",
+ "\n",
+ " stock_earning = stock.quarterly_earnings\n",
+ " stock_earning.to_csv(path + \"/earnings.csv\")\n",
+ "\n",
+ " stock_basicinfo = stock.info.items()\n",
+ " stock_basicinfo = list(stock_basicinfo)\n",
+ " stock_basic_df = pd.DataFrame(stock_basicinfo)\n",
+ " stock_basic_df = stock_basic_df.rename(columns={0: \"info\", 1: \"value\"})\n",
+ " stock_basic_df.to_csv(path + \"/basic_info.csv\")"
+ ]
+ }
+ ],
+ "metadata": {
+ "interpreter": {
+ "hash": "d2feefea56b0213a6ec2bb54630eea72d1e2849cc5d96656889c1540b99c0617"
+ },
+ "kernelspec": {
+ "display_name": "Python 3.9.8 ('venv_for_ml': venv)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.8"
+ },
+ "orig_nbformat": 4
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/data_processing.ipynb b/data_processing.ipynb
index 2e59d87..18bbf35 100644
--- a/data_processing.ipynb
+++ b/data_processing.ipynb
@@ -1,249 +1,142 @@
{
"cells": [
{
- "cell_type": "code",
- "execution_count": 10,
+ "cell_type": "markdown",
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " Rank | \n",
- " Name | \n",
- " Symbol | \n",
- " marketcap | \n",
- " price (USD) | \n",
- " country | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " 0 | \n",
- " 1 | \n",
- " Apple | \n",
- " AAPL | \n",
- " 2613550252032 | \n",
- " 160.15 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 1 | \n",
- " 2 | \n",
- " Microsoft | \n",
- " MSFT | \n",
- " 2075883208704 | \n",
- " 276.90 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 2 | \n",
- " 3 | \n",
- " Alphabet (Google) | \n",
- " GOOG | \n",
- " 1608236793856 | \n",
- " 2432.90 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 3 | \n",
- " 4 | \n",
- " Amazon | \n",
- " AMZN | \n",
- " 1463749312512 | \n",
- " 2878.34 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 4 | \n",
- " 5 | \n",
- " Tesla | \n",
- " TSLA | \n",
- " 1029417271296 | \n",
- " 996.04 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- " ... | \n",
- "
\n",
- " \n",
- " 730 | \n",
- " 731 | \n",
- " Jump Networks | \n",
- " JUMPNET.NS | \n",
- " 11669324 | \n",
- " 0.12 | \n",
- " India | \n",
- "
\n",
- " \n",
- " 731 | \n",
- " 732 | \n",
- " Cemtrex | \n",
- " CETX | \n",
- " 10846338 | \n",
- " 0.44 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 732 | \n",
- " 733 | \n",
- " Pareteum Corporation | \n",
- " TEUM | \n",
- " 1426969 | \n",
- " 0.01 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 733 | \n",
- " 734 | \n",
- " Justworks | \n",
- " JW | \n",
- " 0 | \n",
- " 0.00 | \n",
- " United States | \n",
- "
\n",
- " \n",
- " 734 | \n",
- " 735 | \n",
- " Rhodium Enterprises | \n",
- " RHDM | \n",
- " 0 | \n",
- " 0.00 | \n",
- " United States | \n",
- "
\n",
- " \n",
- "
\n",
- "
735 rows × 6 columns
\n",
- "
"
- ],
- "text/plain": [
- " Rank Name Symbol marketcap price (USD) \\\n",
- "0 1 Apple AAPL 2613550252032 160.15 \n",
- "1 2 Microsoft MSFT 2075883208704 276.90 \n",
- "2 3 Alphabet (Google) GOOG 1608236793856 2432.90 \n",
- "3 4 Amazon AMZN 1463749312512 2878.34 \n",
- "4 5 Tesla TSLA 1029417271296 996.04 \n",
- ".. ... ... ... ... ... \n",
- "730 731 Jump Networks JUMPNET.NS 11669324 0.12 \n",
- "731 732 Cemtrex CETX 10846338 0.44 \n",
- "732 733 Pareteum Corporation TEUM 1426969 0.01 \n",
- "733 734 Justworks JW 0 0.00 \n",
- "734 735 Rhodium Enterprises RHDM 0 0.00 \n",
- "\n",
- " country \n",
- "0 United States \n",
- "1 United States \n",
- "2 United States \n",
- "3 United States \n",
- "4 United States \n",
- ".. ... \n",
- "730 India \n",
- "731 United States \n",
- "732 United States \n",
- "733 United States \n",
- "734 United States \n",
- "\n",
- "[735 rows x 6 columns]"
- ]
- },
- "execution_count": 10,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
"source": [
- "import pandas as pd\n",
- "import numpy as np\n",
- "import yfinance as yf\n",
- "import os\n",
- "\n",
- "tech_sector = pd.read_csv(\"Data/tech_sector.csv\")\n",
- "tech_sector"
+ "In Approach one, we will process the data using a ratio rather than the usual normalization. For example we will take all the cashflow values as a ratio to net income, and all the balance sheet values as a ratio to current assets. We can compare the performance between the two."
]
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
- "data": {
- "text/plain": [
- "'c:\\\\Users\\\\brian\\\\projects\\\\factor_models\\\\Data'"
- ]
- },
- "execution_count": 11,
- "metadata": {},
- "output_type": "execute_result"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cash flow OOF 259960.KS\n",
+ "Cash flow OOF 259960.KS\n",
+ "Cash flow OOF 259960.KS\n",
+ "Cash flow OOF 259960.KS\n",
+ "Cash flow OOF 259960.KS\n",
+ "Cash flow OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "Balance SHEET OOF 259960.KS\n",
+ "RETURN OOF 259960.KS\n"
+ ]
}
],
"source": [
- "parent_dir = os.path.join(os.getcwd() , \"Data\")\n",
- "parent_dir"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {},
- "outputs": [],
- "source": [
- "#grab the stock off of yahoo\n",
- "stock = yf.Ticker(tech_sector[\"Symbol\"].iloc[0])\n",
+ "import os\n",
+ "import pandas as pd\n",
+ "import dateutil.relativedelta\n",
+ "from datetime import datetime\n",
+ "\n",
+ "\n",
+ "parent_dir = os.path.join(os.getcwd() , \"Data/Raw\")\n",
+ "OLS_input = {}\n",
+ "#basic_info_check = [\"ebitdaMargins\" , \"profitMargins\" , \"grossMargins\", \"debtToEquity\", \"returnOnEquity\" ]\n",
+ "cashflow_info_check = [\"Change To Liabilities\", \"Total Cash From Operating Activities\", \"Net Borrowings\" , \"Total Cashflows From Investing Activities\" , \"Investments\", \"Net Income\"]\n",
+ "balance_sheet_info_check = [\"Total Liab\" , \"Total Assets\", \"Retained Earnings\", \"Cash\", \"Net Receivables\", \"Long Term Debt\", \"Short Long Term Debt\", \"Total Current Assets\"]\n",
+ "\n",
+ "for file in os.listdir(parent_dir):\n",
+ " path = os.path.join(parent_dir , file)\n",
+ " \n",
+ "\n",
+ " ### Get variables from Cash Flow Statement ###\n",
+ " cashflow_info = pd.read_csv(path + \"/cashflow.csv\")\n",
+ " balance_sheet = pd.read_csv(path + \"/stock_balance_sheet.csv\")\n",
+ " \n",
+ " if(cashflow_info.empty or balance_sheet.empty):\n",
+ " continue\n",
+ " \n",
+ "\n",
+ " if(len(cashflow_info.columns) != len(balance_sheet.columns)):\n",
+ " print(\"EEROROR\")\n",
+ " \n",
+ "\n",
+ " for info_item in cashflow_info_check:\n",
+ " \n",
+ " if(info_item in cashflow_info[\"Unnamed: 0\"].values):\n",
+ "\n",
+ " data = cashflow_info[cashflow_info[\"Unnamed: 0\"] == info_item].values[0][1::]\n",
+ " data = data.tolist()\n",
+ " if len(data) != 4:\n",
+ "\n",
+ " print(\"Cash flow OOF\" , file)\n",
+ " # data = transformer.transform(data.reshape(1, -1))\n",
+ " # data = data.tolist()\n",
+ "\n",
+ " else:\n",
+ " data = [None] * (len(balance_sheet.columns)-1)\n",
+ "\n",
+ " if info_item in OLS_input:\n",
+ "\n",
+ " OLS_input[info_item] += data\n",
+ " else:\n",
+ " OLS_input[info_item] = data\n",
+ "\n",
+ " ### Get variables from balance sheet ###\n",
+ "\n",
"\n",
- "#get the stocks return history\n",
- "path = os.path.join(parent_dir, tech_sector[\"Symbol\"].iloc[0])\n",
- "if not(os.path.isdir(path)):\n",
- " os.mkdir(path)\n",
"\n",
- "#put the data regarding the stock into this folder\n",
- "stock_prices = stock.history(period=\"max\")\n",
- "stock_prices.to_csv(path + \"/stock_prices.csv\")\n",
+ " for info_item in balance_sheet_info_check:\n",
+ " if(info_item in balance_sheet[\"Unnamed: 0\"].values):\n",
+ " \n",
+ " data = balance_sheet[balance_sheet[\"Unnamed: 0\"] == info_item].values[0][1::]\n",
+ " data = data.tolist()\n",
+ " if len(data) != 4:\n",
+ " print(\"Balance SHEET OOF\", file)\n",
+ " # data = transformer.transform(data.reshape(1, -1))\n",
+ " # data = data.tolist() \n",
+ " else:\n",
+ " data = [None] * (len(balance_sheet.columns)-1)\n",
"\n",
- "#put the fundemental data into the folder\n",
- "stock_balance_sheet = stock.quarterly_balance_sheet\n",
- "stock_balance_sheet.to_csv(path + \"/stock_balance_sheet.csv\")\n",
+ " if info_item in OLS_input:\n",
+ " OLS_input[info_item] += data\n",
+ " else:\n",
+ " OLS_input[info_item] = data\n",
+ " \n",
+ " \n",
+ " ### Get the returns of the stock over the quater\n",
+ " \n",
+ " times = balance_sheet.columns.values[1::]\n",
+ " times = list(map(datetime.fromisoformat, times))\n",
+ " stock_price_history = pd.read_csv(path + \"/stock_prices.csv\")\n",
+ " stock_price_history[\"Date\"] = pd.to_datetime(stock_price_history[\"Date\"])\n",
+ " quarterly_returns = []\n",
"\n",
- "stock_sustainability = stock.sustainability\n",
- "stock_sustainability.to_csv(path + \"/sustainability.csv\")\n",
"\n",
- "stock_finacials = stock.quarterly_financials\n",
- "stock_finacials.to_csv(path + \"/sustainability.csv\")\n",
+ " for i in range(len(times)):\n",
+ " quarterly_data = pd.DataFrame()\n",
+ " quarterly_data = stock_price_history[(stock_price_history[\"Date\"] < times[i] ) & (stock_price_history[\"Date\"] > times[i] - dateutil.relativedelta.relativedelta(months=3))].reset_index(drop=True)\n",
+ " #calculate the net return in each quater\n",
+ " if not(quarterly_data.empty) :\n",
+ " total_ret = (quarterly_data.loc[len(quarterly_data)-1][\"Close\"] - quarterly_data.loc[0][\"Open\"])/quarterly_data.loc[0][\"Open\"]\n",
+ " quarterly_returns.append(total_ret)\n",
+ " else:\n",
+ " quarterly_returns.append(None)\n",
+ " \n",
+ " if len(quarterly_returns) != 4:\n",
+ " print(\"RETURN OOF\", file)\n",
"\n",
- "stock_cashflow = stock.cashflow\n",
- "stock_cashflow.to_csv(path + \"/cashflow.csv\")\n",
+ " if \"Returns\" not in OLS_input:\n",
+ " OLS_input[\"Returns\"] = quarterly_returns\n",
+ " else:\n",
+ " OLS_input[\"Returns\"] += quarterly_returns\n",
"\n",
- "stock_earning = stock.earnings\n",
- "stock_earning.to_csv(path + \"/earnings.csv\")\n",
+ " \n",
+ "for key , val in OLS_input.items():\n",
+ " print(key , len(val))\n",
"\n",
- "stock_basicinfo = stock.info.items()\n",
- "stock_basicinfo = list(stock_basicinfo)\n",
- "stock_basic_df = pd.DataFrame(stock_basicinfo)\n",
- "stock_basic_df = stock_basic_df.rename(columns={0: \"info\", 1: \"value\"})\n",
- "stock_basic_df.to_csv(path + \"/basic_info.csv\")"
+ "df = pd.DataFrame(OLS_input)\n",
+ "df.to_csv(os.path.join(os.getcwd() , \"Data\") + \"/Processed/linear_reg_data.csv\")"
]
}
],
diff --git a/factor_model.ipynb b/factor_model.ipynb
new file mode 100644
index 0000000..34c8812
--- /dev/null
+++ b/factor_model.ipynb
@@ -0,0 +1,417 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Change To Liabilities | \n",
+ " Total Cash From Operating Activities | \n",
+ " Net Borrowings | \n",
+ " Total Cashflows From Investing Activities | \n",
+ " Investments | \n",
+ " Net Income | \n",
+ " Total Liab | \n",
+ " Total Assets | \n",
+ " Retained Earnings | \n",
+ " Cash | \n",
+ " Net Receivables | \n",
+ " Long Term Debt | \n",
+ " Short Long Term Debt | \n",
+ " Total Current Assets | \n",
+ " Returns | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " -2.067230e+11 | \n",
+ " 6.266689e+12 | \n",
+ " 4.503500e+10 | \n",
+ " -6.350965e+12 | \n",
+ " -3.286883e+12 | \n",
+ " 3.310823e+12 | \n",
+ " 2.455460e+13 | \n",
+ " 8.326905e+13 | \n",
+ " 5.246040e+13 | \n",
+ " 2.761977e+12 | \n",
+ " 7.545234e+12 | \n",
+ " 1.176780e+13 | \n",
+ " 2.311561e+12 | \n",
+ " 2.491050e+13 | \n",
+ " -0.215686 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " -1.101190e+11 | \n",
+ " 4.549973e+12 | \n",
+ " 1.655130e+11 | \n",
+ " -3.484309e+12 | \n",
+ " -2.414150e+11 | \n",
+ " 1.984514e+12 | \n",
+ " 2.283988e+13 | \n",
+ " 7.771790e+13 | \n",
+ " 4.915642e+13 | \n",
+ " 2.666351e+12 | \n",
+ " 6.522701e+12 | \n",
+ " 1.153141e+13 | \n",
+ " 2.167540e+12 | \n",
+ " 2.009956e+13 | \n",
+ " -0.070632 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 1.891400e+10 | \n",
+ " 3.206762e+12 | \n",
+ " 1.900472e+12 | \n",
+ " -5.885210e+12 | \n",
+ " -1.747571e+12 | \n",
+ " 9.904470e+11 | \n",
+ " 2.273942e+13 | \n",
+ " 7.511801e+13 | \n",
+ " 4.717885e+13 | \n",
+ " 2.226144e+12 | \n",
+ " 5.379719e+12 | \n",
+ " 1.078574e+13 | \n",
+ " 2.658938e+12 | \n",
+ " 1.838488e+13 | \n",
+ " 0.080321 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 3.116740e+11 | \n",
+ " 3.261827e+12 | \n",
+ " -5.049000e+10 | \n",
+ " -2.979418e+12 | \n",
+ " -4.332600e+10 | \n",
+ " 1.766796e+12 | \n",
+ " 1.926476e+13 | \n",
+ " 7.117385e+13 | \n",
+ " 4.699573e+13 | \n",
+ " 2.975989e+12 | \n",
+ " 5.241949e+12 | \n",
+ " 8.199087e+12 | \n",
+ " 2.934671e+12 | \n",
+ " 1.657095e+13 | \n",
+ " 0.427711 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 1.027017e+12 | \n",
+ " 2.063545e+13 | \n",
+ " -1.333413e+12 | \n",
+ " 8.722370e+11 | \n",
+ " 1.575785e+13 | \n",
+ " 1.064379e+13 | \n",
+ " 1.217212e+14 | \n",
+ " 4.266212e+14 | \n",
+ " 2.930648e+14 | \n",
+ " 3.903142e+13 | \n",
+ " 4.521067e+13 | \n",
+ " 5.097320e+11 | \n",
+ " 5.180650e+11 | \n",
+ " 2.181632e+14 | \n",
+ " 0.059540 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 467 | \n",
+ " -1.901744e+09 | \n",
+ " 2.682230e+10 | \n",
+ " 4.167232e+09 | \n",
+ " -1.333849e+10 | \n",
+ " 1.799423e+09 | \n",
+ " 1.594900e+10 | \n",
+ " 1.832240e+11 | \n",
+ " 4.644270e+11 | \n",
+ " 1.082500e+11 | \n",
+ " 1.326220e+11 | \n",
+ " 3.519000e+10 | \n",
+ " 3.983000e+10 | \n",
+ " 3.733200e+10 | \n",
+ " 2.332740e+11 | \n",
+ " 0.029178 | \n",
+ "
\n",
+ " \n",
+ " 468 | \n",
+ " 3.073530e+08 | \n",
+ " 2.212551e+10 | \n",
+ " 6.475969e+09 | \n",
+ " -2.322245e+10 | \n",
+ " -6.018215e+09 | \n",
+ " 1.746024e+10 | \n",
+ " 1.711889e+11 | \n",
+ " 4.287926e+11 | \n",
+ " 1.002505e+11 | \n",
+ " 1.131049e+11 | \n",
+ " 3.437743e+10 | \n",
+ " 5.108895e+10 | \n",
+ " 2.212810e+10 | \n",
+ " 2.116034e+11 | \n",
+ " 0.246093 | \n",
+ "
\n",
+ " \n",
+ " 469 | \n",
+ " 3.097020e+08 | \n",
+ " 2.312352e+10 | \n",
+ " 6.037583e+09 | \n",
+ " -1.848232e+10 | \n",
+ " -1.060335e+10 | \n",
+ " 1.194308e+10 | \n",
+ " 1.814853e+11 | \n",
+ " 4.216774e+11 | \n",
+ " 8.236386e+10 | \n",
+ " 1.240005e+11 | \n",
+ " 3.162152e+10 | \n",
+ " 5.096679e+10 | \n",
+ " 1.426338e+10 | \n",
+ " 2.078333e+11 | \n",
+ " 0.065629 | \n",
+ "
\n",
+ " \n",
+ " 470 | \n",
+ " 1.284689e+09 | \n",
+ " 1.828067e+10 | \n",
+ " 2.195216e+09 | \n",
+ " -7.119745e+09 | \n",
+ " -1.668570e+08 | \n",
+ " 1.042792e+10 | \n",
+ " 1.445894e+11 | \n",
+ " 3.942622e+11 | \n",
+ " 9.034396e+10 | \n",
+ " 1.072852e+11 | \n",
+ " 3.101319e+10 | \n",
+ " 2.770260e+10 | \n",
+ " 3.212053e+10 | \n",
+ " 1.790831e+11 | \n",
+ " 0.081508 | \n",
+ "
\n",
+ " \n",
+ " 482 | \n",
+ " 0.000000e+00 | \n",
+ " 6.830338e+09 | \n",
+ " -1.701114e+09 | \n",
+ " -6.440656e+09 | \n",
+ " -8.117702e+09 | \n",
+ " 8.268477e+09 | \n",
+ " 1.603868e+11 | \n",
+ " 2.964236e+11 | \n",
+ " 6.696965e+10 | \n",
+ " 3.188104e+10 | \n",
+ " 4.557126e+10 | \n",
+ " 1.326215e+10 | \n",
+ " 6.051582e+09 | \n",
+ " 2.003298e+11 | \n",
+ " 0.092308 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
128 rows × 15 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Change To Liabilities Total Cash From Operating Activities \\\n",
+ "0 -2.067230e+11 6.266689e+12 \n",
+ "1 -1.101190e+11 4.549973e+12 \n",
+ "2 1.891400e+10 3.206762e+12 \n",
+ "3 3.116740e+11 3.261827e+12 \n",
+ "4 1.027017e+12 2.063545e+13 \n",
+ ".. ... ... \n",
+ "467 -1.901744e+09 2.682230e+10 \n",
+ "468 3.073530e+08 2.212551e+10 \n",
+ "469 3.097020e+08 2.312352e+10 \n",
+ "470 1.284689e+09 1.828067e+10 \n",
+ "482 0.000000e+00 6.830338e+09 \n",
+ "\n",
+ " Net Borrowings Total Cashflows From Investing Activities Investments \\\n",
+ "0 4.503500e+10 -6.350965e+12 -3.286883e+12 \n",
+ "1 1.655130e+11 -3.484309e+12 -2.414150e+11 \n",
+ "2 1.900472e+12 -5.885210e+12 -1.747571e+12 \n",
+ "3 -5.049000e+10 -2.979418e+12 -4.332600e+10 \n",
+ "4 -1.333413e+12 8.722370e+11 1.575785e+13 \n",
+ ".. ... ... ... \n",
+ "467 4.167232e+09 -1.333849e+10 1.799423e+09 \n",
+ "468 6.475969e+09 -2.322245e+10 -6.018215e+09 \n",
+ "469 6.037583e+09 -1.848232e+10 -1.060335e+10 \n",
+ "470 2.195216e+09 -7.119745e+09 -1.668570e+08 \n",
+ "482 -1.701114e+09 -6.440656e+09 -8.117702e+09 \n",
+ "\n",
+ " Net Income Total Liab Total Assets Retained Earnings \\\n",
+ "0 3.310823e+12 2.455460e+13 8.326905e+13 5.246040e+13 \n",
+ "1 1.984514e+12 2.283988e+13 7.771790e+13 4.915642e+13 \n",
+ "2 9.904470e+11 2.273942e+13 7.511801e+13 4.717885e+13 \n",
+ "3 1.766796e+12 1.926476e+13 7.117385e+13 4.699573e+13 \n",
+ "4 1.064379e+13 1.217212e+14 4.266212e+14 2.930648e+14 \n",
+ ".. ... ... ... ... \n",
+ "467 1.594900e+10 1.832240e+11 4.644270e+11 1.082500e+11 \n",
+ "468 1.746024e+10 1.711889e+11 4.287926e+11 1.002505e+11 \n",
+ "469 1.194308e+10 1.814853e+11 4.216774e+11 8.236386e+10 \n",
+ "470 1.042792e+10 1.445894e+11 3.942622e+11 9.034396e+10 \n",
+ "482 8.268477e+09 1.603868e+11 2.964236e+11 6.696965e+10 \n",
+ "\n",
+ " Cash Net Receivables Long Term Debt Short Long Term Debt \\\n",
+ "0 2.761977e+12 7.545234e+12 1.176780e+13 2.311561e+12 \n",
+ "1 2.666351e+12 6.522701e+12 1.153141e+13 2.167540e+12 \n",
+ "2 2.226144e+12 5.379719e+12 1.078574e+13 2.658938e+12 \n",
+ "3 2.975989e+12 5.241949e+12 8.199087e+12 2.934671e+12 \n",
+ "4 3.903142e+13 4.521067e+13 5.097320e+11 5.180650e+11 \n",
+ ".. ... ... ... ... \n",
+ "467 1.326220e+11 3.519000e+10 3.983000e+10 3.733200e+10 \n",
+ "468 1.131049e+11 3.437743e+10 5.108895e+10 2.212810e+10 \n",
+ "469 1.240005e+11 3.162152e+10 5.096679e+10 1.426338e+10 \n",
+ "470 1.072852e+11 3.101319e+10 2.770260e+10 3.212053e+10 \n",
+ "482 3.188104e+10 4.557126e+10 1.326215e+10 6.051582e+09 \n",
+ "\n",
+ " Total Current Assets Returns \n",
+ "0 2.491050e+13 -0.215686 \n",
+ "1 2.009956e+13 -0.070632 \n",
+ "2 1.838488e+13 0.080321 \n",
+ "3 1.657095e+13 0.427711 \n",
+ "4 2.181632e+14 0.059540 \n",
+ ".. ... ... \n",
+ "467 2.332740e+11 0.029178 \n",
+ "468 2.116034e+11 0.246093 \n",
+ "469 2.078333e+11 0.065629 \n",
+ "470 1.790831e+11 0.081508 \n",
+ "482 2.003298e+11 0.092308 \n",
+ "\n",
+ "[128 rows x 15 columns]"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import pandas as pd\n",
+ "import statsmodels.api as sm\n",
+ "\n",
+ "df = pd.read_csv(\"Data/Processed/linear_reg_data.csv\")\n",
+ "df = df.dropna().drop(columns=[\"Unnamed: 0\"]).reset_index(drop=True)\n",
+ "df = df[df[\"Net Income\"] > 1000000000]\n",
+ "df\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "const 9.140611e+11\n",
+ "Change To Liabilities -1.000000e+00\n",
+ "Total Cash From Operating Activities 1.351298e+00\n",
+ "Net Borrowings -1.991888e+00\n",
+ "Total Cashflows From Investing Activities -4.411001e+00\n",
+ "Investments 2.564988e+00\n",
+ "Net Income -3.986257e+00\n",
+ "Total Liab 3.498029e-01\n",
+ "Total Assets -2.967563e-01\n",
+ "Retained Earnings 2.671895e-01\n",
+ "Cash 3.151412e+00\n",
+ "Net Receivables 1.945539e+00\n",
+ "Long Term Debt -1.170602e+00\n",
+ "Short Long Term Debt 2.874320e-01\n",
+ "Total Current Assets -1.049530e+00\n",
+ "dtype: float64"
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "columns = df.columns.values.tolist()\n",
+ "columns.remove(\"Returns\")\n",
+ "X = df[columns]\n",
+ "y = df[\"Returns\"]\n",
+ "\n",
+ "X = sm.add_constant(X)\n",
+ "results = sm.OLS(y, X).fit()\n",
+ "output = results.params/abs(results.params.iloc[1])\n",
+ "output"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Perhaps this tells us that for large cap tech companies fundemental factors are not such a good indicator of performance"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "interpreter": {
+ "hash": "d2feefea56b0213a6ec2bb54630eea72d1e2849cc5d96656889c1540b99c0617"
+ },
+ "kernelspec": {
+ "display_name": "Python 3.9.8 ('venv_for_ml': venv)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.8"
+ },
+ "orig_nbformat": 4
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/yfiniance_data.ipynb b/yfiniance_data.ipynb
index 47a07cb..9175cea 100644
--- a/yfiniance_data.ipynb
+++ b/yfiniance_data.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 1,
"metadata": {},
"outputs": [
{
@@ -259,7 +259,7 @@
"Accounts Payable 4.474800e+07 "
]
},
- "execution_count": 3,
+ "execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
@@ -274,266 +274,19 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 3,
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " 2021-12-25 | \n",
- " 2021-09-25 | \n",
- " 2021-06-26 | \n",
- " 2021-03-27 | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " Total Liab | \n",
- " 3.092590e+11 | \n",
- " 2.879120e+11 | \n",
- " 2.655600e+11 | \n",
- " 2.679800e+11 | \n",
- "
\n",
- " \n",
- " Total Stockholder Equity | \n",
- " 7.193200e+10 | \n",
- " 6.309000e+10 | \n",
- " 6.428000e+10 | \n",
- " 6.917800e+10 | \n",
- "
\n",
- " \n",
- " Other Current Liab | \n",
- " 5.704300e+10 | \n",
- " 5.357700e+10 | \n",
- " 5.130600e+10 | \n",
- " 5.325500e+10 | \n",
- "
\n",
- " \n",
- " Total Assets | \n",
- " 3.811910e+11 | \n",
- " 3.510020e+11 | \n",
- " 3.298400e+11 | \n",
- " 3.371580e+11 | \n",
- "
\n",
- " \n",
- " Common Stock | \n",
- " 5.842400e+10 | \n",
- " 5.736500e+10 | \n",
- " 5.498900e+10 | \n",
- " 5.420300e+10 | \n",
- "
\n",
- " \n",
- " Other Current Assets | \n",
- " 1.811200e+10 | \n",
- " 1.411100e+10 | \n",
- " 1.364100e+10 | \n",
- " 1.337600e+10 | \n",
- "
\n",
- " \n",
- " Retained Earnings | \n",
- " 1.443500e+10 | \n",
- " 5.562000e+09 | \n",
- " 9.233000e+09 | \n",
- " 1.526100e+10 | \n",
- "
\n",
- " \n",
- " Other Liab | \n",
- " 5.505600e+10 | \n",
- " 4.305000e+10 | \n",
- " 3.835400e+10 | \n",
- " 3.985300e+10 | \n",
- "
\n",
- " \n",
- " Treasury Stock | \n",
- " -9.270000e+08 | \n",
- " 1.630000e+08 | \n",
- " 5.800000e+07 | \n",
- " -2.860000e+08 | \n",
- "
\n",
- " \n",
- " Other Assets | \n",
- " 5.010900e+10 | \n",
- " 3.876200e+10 | \n",
- " 4.485400e+10 | \n",
- " 4.333900e+10 | \n",
- "
\n",
- " \n",
- " Cash | \n",
- " 3.711900e+10 | \n",
- " 3.494000e+10 | \n",
- " 3.405000e+10 | \n",
- " 3.846600e+10 | \n",
- "
\n",
- " \n",
- " Total Current Liabilities | \n",
- " 1.475740e+11 | \n",
- " 1.254810e+11 | \n",
- " 1.077540e+11 | \n",
- " 1.063850e+11 | \n",
- "
\n",
- " \n",
- " Short Long Term Debt | \n",
- " 1.116900e+10 | \n",
- " 9.613000e+09 | \n",
- " 8.039000e+09 | \n",
- " 8.003000e+09 | \n",
- "
\n",
- " \n",
- " Other Stockholder Equity | \n",
- " -9.270000e+08 | \n",
- " 1.630000e+08 | \n",
- " 5.800000e+07 | \n",
- " -2.860000e+08 | \n",
- "
\n",
- " \n",
- " Property Plant Equipment | \n",
- " 3.924500e+10 | \n",
- " 4.952700e+10 | \n",
- " 3.861500e+10 | \n",
- " 3.781500e+10 | \n",
- "
\n",
- " \n",
- " Total Current Assets | \n",
- " 1.531540e+11 | \n",
- " 1.348360e+11 | \n",
- " 1.144230e+11 | \n",
- " 1.214650e+11 | \n",
- "
\n",
- " \n",
- " Long Term Investments | \n",
- " 1.386830e+11 | \n",
- " 1.278770e+11 | \n",
- " 1.319480e+11 | \n",
- " 1.345390e+11 | \n",
- "
\n",
- " \n",
- " Net Tangible Assets | \n",
- " 7.193200e+10 | \n",
- " 6.309000e+10 | \n",
- " 6.428000e+10 | \n",
- " 6.917800e+10 | \n",
- "
\n",
- " \n",
- " Short Term Investments | \n",
- " 2.679400e+10 | \n",
- " 2.769900e+10 | \n",
- " 2.764600e+10 | \n",
- " 3.136800e+10 | \n",
- "
\n",
- " \n",
- " Net Receivables | \n",
- " 6.525300e+10 | \n",
- " 5.150600e+10 | \n",
- " 3.390800e+10 | \n",
- " 3.303600e+10 | \n",
- "
\n",
- " \n",
- " Long Term Debt | \n",
- " 1.066290e+11 | \n",
- " 1.091060e+11 | \n",
- " 1.057520e+11 | \n",
- " 1.086420e+11 | \n",
- "
\n",
- " \n",
- " Inventory | \n",
- " 5.876000e+09 | \n",
- " 6.580000e+09 | \n",
- " 5.178000e+09 | \n",
- " 5.219000e+09 | \n",
- "
\n",
- " \n",
- " Accounts Payable | \n",
- " 7.436200e+10 | \n",
- " 5.476300e+10 | \n",
- " 4.040900e+10 | \n",
- " 4.012700e+10 | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " 2021-12-25 2021-09-25 2021-06-26 \\\n",
- "Total Liab 3.092590e+11 2.879120e+11 2.655600e+11 \n",
- "Total Stockholder Equity 7.193200e+10 6.309000e+10 6.428000e+10 \n",
- "Other Current Liab 5.704300e+10 5.357700e+10 5.130600e+10 \n",
- "Total Assets 3.811910e+11 3.510020e+11 3.298400e+11 \n",
- "Common Stock 5.842400e+10 5.736500e+10 5.498900e+10 \n",
- "Other Current Assets 1.811200e+10 1.411100e+10 1.364100e+10 \n",
- "Retained Earnings 1.443500e+10 5.562000e+09 9.233000e+09 \n",
- "Other Liab 5.505600e+10 4.305000e+10 3.835400e+10 \n",
- "Treasury Stock -9.270000e+08 1.630000e+08 5.800000e+07 \n",
- "Other Assets 5.010900e+10 3.876200e+10 4.485400e+10 \n",
- "Cash 3.711900e+10 3.494000e+10 3.405000e+10 \n",
- "Total Current Liabilities 1.475740e+11 1.254810e+11 1.077540e+11 \n",
- "Short Long Term Debt 1.116900e+10 9.613000e+09 8.039000e+09 \n",
- "Other Stockholder Equity -9.270000e+08 1.630000e+08 5.800000e+07 \n",
- "Property Plant Equipment 3.924500e+10 4.952700e+10 3.861500e+10 \n",
- "Total Current Assets 1.531540e+11 1.348360e+11 1.144230e+11 \n",
- "Long Term Investments 1.386830e+11 1.278770e+11 1.319480e+11 \n",
- "Net Tangible Assets 7.193200e+10 6.309000e+10 6.428000e+10 \n",
- "Short Term Investments 2.679400e+10 2.769900e+10 2.764600e+10 \n",
- "Net Receivables 6.525300e+10 5.150600e+10 3.390800e+10 \n",
- "Long Term Debt 1.066290e+11 1.091060e+11 1.057520e+11 \n",
- "Inventory 5.876000e+09 6.580000e+09 5.178000e+09 \n",
- "Accounts Payable 7.436200e+10 5.476300e+10 4.040900e+10 \n",
- "\n",
- " 2021-03-27 \n",
- "Total Liab 2.679800e+11 \n",
- "Total Stockholder Equity 6.917800e+10 \n",
- "Other Current Liab 5.325500e+10 \n",
- "Total Assets 3.371580e+11 \n",
- "Common Stock 5.420300e+10 \n",
- "Other Current Assets 1.337600e+10 \n",
- "Retained Earnings 1.526100e+10 \n",
- "Other Liab 3.985300e+10 \n",
- "Treasury Stock -2.860000e+08 \n",
- "Other Assets 4.333900e+10 \n",
- "Cash 3.846600e+10 \n",
- "Total Current Liabilities 1.063850e+11 \n",
- "Short Long Term Debt 8.003000e+09 \n",
- "Other Stockholder Equity -2.860000e+08 \n",
- "Property Plant Equipment 3.781500e+10 \n",
- "Total Current Assets 1.214650e+11 \n",
- "Long Term Investments 1.345390e+11 \n",
- "Net Tangible Assets 6.917800e+10 \n",
- "Short Term Investments 3.136800e+10 \n",
- "Net Receivables 3.303600e+10 \n",
- "Long Term Debt 1.086420e+11 \n",
- "Inventory 5.219000e+09 \n",
- "Accounts Payable 4.012700e+10 "
- ]
- },
- "execution_count": 4,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
- "apple.quarterly_balance_sheet"
+ "apple.quarterly_balance_sheet\n",
+ "temp = apple.info.items()\n",
+ "temp = list(temp)\n",
+ "\n"
]
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -542,7 +295,7 @@
"datetime.datetime(2021, 9, 25, 0, 0)"
]
},
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -559,7 +312,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -635,7 +388,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -668,7 +421,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -679,7 +432,7 @@
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -799,227 +552,25 @@
},
{
"data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " 2021-12-25 | \n",
- " 2021-09-25 | \n",
- " 2021-06-26 | \n",
- " 2021-03-27 | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " Total Liab | \n",
- " 2.019268 | \n",
- " 2.135275 | \n",
- " 2.320862 | \n",
- " 2.206232 | \n",
- "
\n",
- " \n",
- " Total Stockholder Equity | \n",
- " 0.469671 | \n",
- " 0.467902 | \n",
- " 0.561775 | \n",
- " 0.569530 | \n",
- "
\n",
- " \n",
- " Other Current Liab | \n",
- " 0.372455 | \n",
- " 0.397349 | \n",
- " 0.448389 | \n",
- " 0.438439 | \n",
- "
\n",
- " \n",
- " Total Assets | \n",
- " 2.488939 | \n",
- " 2.603177 | \n",
- " 2.882637 | \n",
- " 2.775763 | \n",
- "
\n",
- " \n",
- " Common Stock | \n",
- " 0.381472 | \n",
- " 0.425443 | \n",
- " 0.480576 | \n",
- " 0.446244 | \n",
- "
\n",
- " \n",
- " Other Current Assets | \n",
- " 0.118260 | \n",
- " 0.104653 | \n",
- " 0.119216 | \n",
- " 0.110122 | \n",
- "
\n",
- " \n",
- " Retained Earnings | \n",
- " 0.094252 | \n",
- " 0.041250 | \n",
- " 0.080692 | \n",
- " 0.125641 | \n",
- "
\n",
- " \n",
- " Other Liab | \n",
- " 0.359481 | \n",
- " 0.319277 | \n",
- " 0.335195 | \n",
- " 0.328103 | \n",
- "
\n",
- " \n",
- " Treasury Stock | \n",
- " -0.006053 | \n",
- " 0.001209 | \n",
- " 0.000507 | \n",
- " -0.002355 | \n",
- "
\n",
- " \n",
- " Other Assets | \n",
- " 0.327180 | \n",
- " 0.287475 | \n",
- " 0.392002 | \n",
- " 0.356802 | \n",
- "
\n",
- " \n",
- " Cash | \n",
- " 0.242364 | \n",
- " 0.259130 | \n",
- " 0.297580 | \n",
- " 0.316684 | \n",
- "
\n",
- " \n",
- " Total Current Liabilities | \n",
- " 0.963566 | \n",
- " 0.930619 | \n",
- " 0.941716 | \n",
- " 0.875849 | \n",
- "
\n",
- " \n",
- " Short Long Term Debt | \n",
- " 0.072927 | \n",
- " 0.071294 | \n",
- " 0.070257 | \n",
- " 0.065887 | \n",
- "
\n",
- " \n",
- " Other Stockholder Equity | \n",
- " -0.006053 | \n",
- " 0.001209 | \n",
- " 0.000507 | \n",
- " -0.002355 | \n",
- "
\n",
- " \n",
- " Property Plant Equipment | \n",
- " 0.256245 | \n",
- " 0.367313 | \n",
- " 0.337476 | \n",
- " 0.311324 | \n",
- "
\n",
- " \n",
- " Total Current Assets | \n",
- " 1.000000 | \n",
- " 1.000000 | \n",
- " 1.000000 | \n",
- " 1.000000 | \n",
- "
\n",
- " \n",
- " Long Term Investments | \n",
- " 0.905513 | \n",
- " 0.948389 | \n",
- " 1.153160 | \n",
- " 1.107636 | \n",
- "
\n",
- " \n",
- " Net Tangible Assets | \n",
- " 0.469671 | \n",
- " 0.467902 | \n",
- " 0.561775 | \n",
- " 0.569530 | \n",
- "
\n",
- " \n",
- " Short Term Investments | \n",
- " 0.174948 | \n",
- " 0.205427 | \n",
- " 0.241612 | \n",
- " 0.258247 | \n",
- "
\n",
- " \n",
- " Net Receivables | \n",
- " 0.426061 | \n",
- " 0.381990 | \n",
- " 0.296339 | \n",
- " 0.271980 | \n",
- "
\n",
- " \n",
- " Long Term Debt | \n",
- " 0.696221 | \n",
- " 0.809176 | \n",
- " 0.924220 | \n",
- " 0.894430 | \n",
- "
\n",
- " \n",
- " Inventory | \n",
- " 0.038367 | \n",
- " 0.048800 | \n",
- " 0.045253 | \n",
- " 0.042967 | \n",
- "
\n",
- " \n",
- " Accounts Payable | \n",
- " 0.485537 | \n",
- " 0.406145 | \n",
- " 0.353155 | \n",
- " 0.330359 | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
"text/plain": [
- " 2021-12-25 2021-09-25 2021-06-26 2021-03-27\n",
- "Total Liab 2.019268 2.135275 2.320862 2.206232\n",
- "Total Stockholder Equity 0.469671 0.467902 0.561775 0.569530\n",
- "Other Current Liab 0.372455 0.397349 0.448389 0.438439\n",
- "Total Assets 2.488939 2.603177 2.882637 2.775763\n",
- "Common Stock 0.381472 0.425443 0.480576 0.446244\n",
- "Other Current Assets 0.118260 0.104653 0.119216 0.110122\n",
- "Retained Earnings 0.094252 0.041250 0.080692 0.125641\n",
- "Other Liab 0.359481 0.319277 0.335195 0.328103\n",
- "Treasury Stock -0.006053 0.001209 0.000507 -0.002355\n",
- "Other Assets 0.327180 0.287475 0.392002 0.356802\n",
- "Cash 0.242364 0.259130 0.297580 0.316684\n",
- "Total Current Liabilities 0.963566 0.930619 0.941716 0.875849\n",
- "Short Long Term Debt 0.072927 0.071294 0.070257 0.065887\n",
- "Other Stockholder Equity -0.006053 0.001209 0.000507 -0.002355\n",
- "Property Plant Equipment 0.256245 0.367313 0.337476 0.311324\n",
- "Total Current Assets 1.000000 1.000000 1.000000 1.000000\n",
- "Long Term Investments 0.905513 0.948389 1.153160 1.107636\n",
- "Net Tangible Assets 0.469671 0.467902 0.561775 0.569530\n",
- "Short Term Investments 0.174948 0.205427 0.241612 0.258247\n",
- "Net Receivables 0.426061 0.381990 0.296339 0.271980\n",
- "Long Term Debt 0.696221 0.809176 0.924220 0.894430\n",
- "Inventory 0.038367 0.048800 0.045253 0.042967\n",
- "Accounts Payable 0.485537 0.406145 0.353155 0.330359"
+ "[]"
]
},
- "execution_count": 33,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbW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