204 lines
259 KiB
Plaintext
204 lines
259 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Старт\n",
|
||
|
"\n",
|
||
|
"Выгрузка данных из csv файла в датафрейм"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
" Insider Trading Relationship Date \\\n",
|
||
|
"0 Kirkhorn Zachary Chief Financial Officer 2022-03-06 \n",
|
||
|
"1 Taneja Vaibhav Chief Accounting Officer 2022-03-06 \n",
|
||
|
"2 Baglino Andrew D SVP Powertrain and Energy Eng. 2022-03-06 \n",
|
||
|
"3 Taneja Vaibhav Chief Accounting Officer 2022-03-05 \n",
|
||
|
"4 Baglino Andrew D SVP Powertrain and Energy Eng. 2022-03-05 \n",
|
||
|
".. ... ... ... \n",
|
||
|
"151 Musk Elon CEO 2021-11-11 \n",
|
||
|
"152 Musk Elon CEO 2021-11-11 \n",
|
||
|
"153 Musk Elon CEO 2021-11-10 \n",
|
||
|
"154 Musk Elon CEO 2021-11-10 \n",
|
||
|
"155 Musk Elon CEO 2021-11-10 \n",
|
||
|
"\n",
|
||
|
" Transaction Cost Shares Value ($) Shares Total \\\n",
|
||
|
"0 Sale 196.72 10,455 2,056,775 203,073 \n",
|
||
|
"1 Sale 195.79 2,466 482,718 100,458 \n",
|
||
|
"2 Sale 195.79 1,298 254,232 65,547 \n",
|
||
|
"3 Option Exercise 0.00 7,138 0 102,923 \n",
|
||
|
"4 Option Exercise 0.00 2,586 0 66,845 \n",
|
||
|
".. ... ... ... ... ... \n",
|
||
|
"151 Sale 1098.24 52,099 57,217,365 167,485,682 \n",
|
||
|
"152 Sale 1072.22 587,638 630,079,728 167,537,781 \n",
|
||
|
"153 Sale 1019.03 58,101 59,206,941 167,346,837 \n",
|
||
|
"154 Sale 1048.46 199,893 209,580,234 167,146,944 \n",
|
||
|
"155 Sale 1068.09 242,006 258,484,236 166,904,938 \n",
|
||
|
"\n",
|
||
|
" SEC Form 4 \n",
|
||
|
"0 Mar 07 07:58 PM \n",
|
||
|
"1 Mar 07 07:57 PM \n",
|
||
|
"2 Mar 07 08:01 PM \n",
|
||
|
"3 Mar 07 07:57 PM \n",
|
||
|
"4 Mar 07 08:01 PM \n",
|
||
|
".. ... \n",
|
||
|
"151 Nov 12 06:03 AM \n",
|
||
|
"152 Nov 12 06:02 AM \n",
|
||
|
"153 Nov 10 09:46 PM \n",
|
||
|
"154 Nov 10 09:47 PM \n",
|
||
|
"155 Nov 10 09:49 PM \n",
|
||
|
"\n",
|
||
|
"[156 rows x 9 columns]\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import pandas as pd\n",
|
||
|
"df = pd.read_csv(\"static/csv/TSLA.csv\")\n",
|
||
|
"print(df)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Диаграмма рассеивания. Взаимосвязь между количеством акций и их стоимостью. По данной диаграмме видно, что чем больше кол-во акций, чем выше стоимость."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA50AAAIjCAYAAACAm3/7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC1i0lEQVR4nOzdeVhUZf8/8PcM67DKKosgCChI7ltqKSggirg8prmvSQuWS18r7DExd/NxeZQgU8FS3FIxzURM0UzEJR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evRIaNu2rdCmTRshOztbod2sWbMEAAqfOz8/X3B2dhacnJyEiooKhfbjxo0TnJ2dFbYBUIhn0qRJQsuWLcX3ycnJglQqFQYOHCjGJAiCcOfOHQGAsGXLFoX+/n6upaWlCVpaWsKSJUsU2l29elXQ1tYWt5eXlwvOzs5Cy5YthZycHIW2T5/L1cX+tJYtWyp8DwqCIIwdO1YwMDAQ38fExAgAhMWLFyu0e+ONNwSJRCKkpKQojPXGG28I2trawoULF8Tt06ZNE79/g4ODVcbytKKiIoX3paWlwiuvvCL069dP7WcLCQkRtLS0hJiYGKX+1I0bEBCg8HUUhNp/bQVBOX9ffvmloKenJ3h7eyv1q8rzPP7q1auCrq6u8NZbbwk5OTmCvb290LVrV6GsrKzaMW7duiVIpVJh+PDhSt8rqs65qp+FJ06cUNpX13Pp6fP2o48+EqytrYUuXbqIP4eeHm/MmDGChYWFwv9Lbm5u4nn39M/mjh0
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"\n",
|
||
|
"df_reduced = df.iloc[::15]\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(10, 6))\n",
|
||
|
"plt.scatter(df_reduced['Shares'], df_reduced['Value ($)'], alpha=0.5)\n",
|
||
|
"plt.title('Взаимосвязь между количеством акций и их стоимостью')\n",
|
||
|
"plt.xlabel('Количество акций (Shares)')\n",
|
||
|
"plt.ylabel('Стоимость ($)')\n",
|
||
|
"plt.grid(True)\n",
|
||
|
"plt.show()\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Объем продаж акций по датам. По этой диаграмме можно сказать, что каждые 2 месяца продажи растут."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAAJOCAYAAABm7rQwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVxV1f7/8dcBmURAQRHIARTnKWdxHhA10yzLHMoxbcBKvV8zm0S95ZCpDeYUDqVmeTVLywFTShPnyNSy4IKmgoYDKAgcYf/+8Me5nZgdOJrv5+PB49691tprrfPZEvphrbVNhmEYiIiIiIiIiIiIlCA7W09ARERERERERETuPUpKiYiIiIiIiIhIiVNSSkRERERERERESpySUiIiIiIiIiIiUuKUlBIRERERERERkRKnpJSIiIiIiIiIiJQ4JaVERERERERERKTEKSklIiIiIiIiIiIlTkkpEREREbknpaam8scff3Dx4kVbT0VEROSepKSUiIiIiNwz1qxZQ5cuXXBzc6NMmTJUqVKFmTNn2npacg87cuQI69evt1xHR0fz9ddf225CIiIlSEkpEREREbkrHT16lCeeeIL77rsPJycn/Pz8GDRoEEePHs2z/csvv0y/fv1wc3Nj8eLFREREsG3bNp577rkSnrnI/1y+fJmnn36aPXv28Pvvv/Piiy/y888/23paIiIlwmQYhmHrSYiIiIiIFMe6desYMGAAnp6ejBgxgoCAAOLj4wkPD+f8+fOsXr2ahx9+2NL+u+++o2PHjkybNo2XX37ZhjMXya1Pnz58+eWXANSsWZPdu3fj5eVl41mJiNx+SkqJiIiIyF0lNjaWhg0bUqVKFb7//nsqVKhgqUtKSqJdu3b88ccfHD58mGrVqgHQq1cvLly4wA8//GCraYsU6NixY1y9epUGDRrg6Oho6+mIiJQIbd8TERERkbvK22+/TVpaGosWLbJKSAGUL1+ehQsXkpqaanVW1J49e6hfvz79+/fH09MTFxcXmjdvnussH5PJZPX1n//8p9D5nD59muHDh1OxYkWcnJyoV68eS5YssWoTGRlp6TM6OjrX/fb29kUab9myZbnm+NevsLAwS9uwsDBMJhO//vor/fr1w93dHS8vL1588UXS09Ot+r127RpTp06levXqODk54e/vzyuvvEJGRkauOcTHx+c7fnx8vKXdhQsX+L//+z8aNGhAmTJlcHd3p0ePHvz0009W/X3zzTeUKlWKWbNmWZX//fP8+eefVKtWjQ4dOpCZmVlgnJYuXUrnzp3x9vbGycmJunXrMn/+/Fzt/P39GTp0qFXZqFGjcHZ2JjIy0qrdgw8+mOv+0aNHYzKZrMpy4v5XV65cwcfHB5PJZNVvx44d6dixIwB169aladOm/PTTT5Z4FqZjx44F/nn46/MA+PDDD6lXr55lu2toaCiXLl0qdJzCxvvrc4Kixd/f37/Aufv7+1vazpo1i9atW+Pl5YWLiwtNmzbN83sl5965c+fmqqtduzYmk4nRo0cX+fOKyO1XytYTEBEREREpjg0bNuDv70+7du3yrG/fvj3+/v5Wh0WfP3+eRYsWUaZMGV544QUqVKjAihUreOSRR1i5ciUDBgygatWqfPLJJwD88ssvvPXWW4XO5ezZs7Rq1cryj90KFSqwadMmRowYQUpKCmPGjLFq7+zszNKlS3n33XctZcuXL8fR0TFXoqggU6ZMISAgwHJ95coVnn322Tzb9uvXD39/f6ZNm8aePXt47733uHjxIh9//LGlzVNPPcXy5ct59NFH+de//sXevXuZNm0av/zyC1988UWe/Q4YMIAHHngAuJ5Y+vTTT63q//vf/7J+/Xoee+wxAgICOHv2LAsXLqRDhw4cO3YMPz8/AB544AFmz57N2LFjqVmzJr179841VkZGBn369MHe3p4vvvii0JVE8+fPp169evTu3ZtSpUqxYcMGnnvuObKzswkNDc33vkmTJhEeHs5nn31mSRbdCu+88w5nz54tUtsJEyYUq+9KlSoxbdo0q7K8nkdYWBiTJ08mODiYZ599luPHjzN//nz279/PDz/8gIODQ7HHy+/PXVHiP3fuXK5cuQL87/vtlVdeoU6dOgCUKVPG0t+7775L7969GTRoEJmZmaxevZrHHnuMjRs30rNnT6u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K1akZ8+eLF26FIC0tDQ+//xzhg0bVuxxReT2U1JKRERERO4aOcmmnORUfvJKXtWuXTtXu5ytQn8/eyfH8OHDqVChAuXKlcPNzY2BAwdatmH9+eefXLp0yXK21V+/cv4BfO7cOav+HBwceOKJJyxnTi1ZsoS+ffvi7u5e2Ee/YTVq1LC6rl69OnZ2dpbPfOLECezs7AgMDLRq5+PjQ9myZXNte0pKSgLAw8OjwHGzs7OZM2cONWrUwMnJifLly1OhQgUOHz6cZ2LCMAzOnj3LH3/8YdnCt3HjRiZNmoRhGPz5559F/sw//PADwcHBuLq6UrZsWSpUqMArr7wCkGvs6OhoBgwYQFZWFhcuXCjyGEURFxfHwoULmTx5cqHJnJUrV3L06NEibRstrpxnWKtWLatyR0dHqlWrVuStbUlJSYU+dyhe/Iti48aNtGrVCmdnZzw9PalQoQLz58/Pt69hw4axatUqMjIyWLNmDeXKlaNz587FHldEbj+dKSUiIiIidw0PDw98fX05fPhwge0OHz7MfffdZ0n2/HWlRXG88cYbtGvXDrPZzMGDB5k6dSqXLl3im2++ITs7G4AnnniCIUOG5Hl/w4YNc5UNHz6cxo0bc/z4cdasWWNZNVVS8jtAuygHa8P/Enh/PYg6L2+99Ravv/46w4cPZ+rUqXh6emJnZ8eYMWMssfur999/n19++YWvvvqK4cOHA3Dw4EH+9a9/cfr0acaOHUuPHj2szhrKS2xsLF26dKF27drMnj2bypUr4+joyDfffMOcOXNyjf3TTz/Ro0cPunTpwvj
|
||
|
"text/plain": [
|
||
|
"<Figure size 1200x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['Date'] = pd.to_datetime(df['Date']) # Преобразуем столбец Date в datetime\n",
|
||
|
"sales_by_date = df.groupby('Date')['Value ($)'].sum().iloc[::3]\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(12, 6))\n",
|
||
|
"plt.plot(sales_by_date.index, sales_by_date.values, marker='o')\n",
|
||
|
"plt.title('Объем продаж акций по датам')\n",
|
||
|
"plt.xlabel('Дата')\n",
|
||
|
"plt.ylabel('Объем продаж ($)')\n",
|
||
|
"plt.grid(True)\n",
|
||
|
"plt.xticks(rotation=45)\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Распределение количества транзакций по должностям. По данной диаграмме понятно, что должность CEO выполняет большее кол-во транзакций."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 21,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA90AAAJOCAYAAACqS2TfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACkQElEQVR4nOzdd3yN9///8efJJpHYgpLYq2hRFdTeu6hapWrVnrVau8SqWRS196ZG7b2qNh+jRmxiJnYiyfX7wy/nmyOhDjmOpI/77ZYbua7rXNfrnFxnPM/1HibDMAwBAAAAAIBY52DvAgAAAAAAiK8I3QAAAAAA2AihGwAAAAAAGyF0AwAAAABgI4RuAAAAAABshNANAAAAAICNELoBAAAAALARQjcAAAAAADZC6AYAAAAAwEYI3QAAAB+IEydOaMWKFebfjxw5ojVr1tivIADAOyN0A3hnM2bMkMlkMv+4ubkpa9asatu2rQIDA+1dHgDEGQ8fPlTLli21b98+nT17Vh06dNDx48ftXRYA4B042bsAAPHHgAEDlCFDBj179ky7du3SxIkTtXbtWp04cUIJEya0d3kA8MHz8/Mz/0hS1qxZ1bx5cztXBQB4F4RuALGmYsWKKlCggCSpWbNmSpYsmUaOHKmVK1eqXr16dq4OAOK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BUvXlwnT55UmjRpJEnh4eGqUqWKNm/erLp166pDhw56+PChNm7cqBMnTihTpkzmY9SrV0+VKlWyOG7Pnj1jrGfQoEEymUzq3r27bt26pdGjR6tMmTI6cuSIEiRIIEnasmWLKlasqPz586tv375ycHAwf2DfuXOnChYsGG2/H330kfz9/SW9+DDdqlWrGI/du3dv1alTR82aNdPt27c1btw4FStWTIcPH1bixImj3aZFixb64osvJEnLli3T8uXLLda3bNlSM2bMUJMmTdS+fXsFBATo119/1eHDh7V79245OzvH+DhYIygoyHzfooqIiFC1atW0a9cutWjRQjly5NDx48c1atQo/fPPPxYDQb2J6dOn66efftIvv/yi+vXrm5dH3r/PPvtM/v7+CgwM1JgxY7R79+5XPm5ffvmlatasKUnauXOnJk+e/Fb38U09efJExYsX17Vr19SyZUulT59ee/bsUc+ePXXjxg2NHj3avG3Tpk01Y8YMVaxYUc2aNVNYWJh27typffv2qUCBApo9e7Z528jaR40apeTJk0uSUqVKZXHsXr16KUeOHHr69Kn5S6WUKVOqadOmkqS///5be/bsUd26dfXRRx/p4sWLmjhxokqUKKGTJ0++sttHihQpLGqJPP+iLov6PJReBM7EiROrX79+OnPmjCZOnKhLly6ZQ4704u/p4eGhzp07y8PDQ1u2bFGfPn304MEDDR8+/C0e/RdatGghb29vXb9+Xb/++qvKlCmjgIAA8/2bOHGicuXKpWrVqsnJyUmrVq1S69atFRERoTZt2rxyv3379tXUqVO1cOHCaF8SvYtffvnljce76N69u1X7jvp6FGnt2rWaP3++xbJ+/fqpf//+KlOmjFq1amX+m/39999WvX68yetfs2bNNHPmTNWuXVtdunTRX3/9JX9/f506dSra61qkyHNbkiZPnqzLly+b11WqVEkjR45Up06dlDVrVlWrVi3a7UNCQlSjRg05Ojpq+fLlb9VaIDAwUIULF9aTJ0/Uvn17JUuWTDNnzlS1atW0ZMkSffnll5L+/T2rTJkyb/x8Cg4OVsWKFWUYhjp37qx06dJJkjp16hRjjY6OjpozZ47F+unTp8vNzU3Pnj2z+j4DsBEDA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j58uVKmzatJMnV1VUODi9edsLDw3X37l15eHgoW7ZsOnT
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"transactions_by_position = df['Relationship'].value_counts()\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(10, 6))\n",
|
||
|
"transactions_by_position.plot(kind='bar')\n",
|
||
|
"plt.title('Распределение количества транзакций по должностям')\n",
|
||
|
"plt.xlabel('Должность')\n",
|
||
|
"plt.ylabel('Количество транзакций')\n",
|
||
|
"plt.xticks(rotation=45)\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "aimenv",
|
||
|
"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.12.5"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|