617 lines
81 KiB
Plaintext
617 lines
81 KiB
Plaintext
|
|
{
|
|||
|
|
"cells": [
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 7,
|
|||
|
|
"id": "f996e528-002f-4856-a67a-5120e8af86ad",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [
|
|||
|
|
{
|
|||
|
|
"name": "stdout",
|
|||
|
|
"output_type": "stream",
|
|||
|
|
"text": [
|
|||
|
|
"Fichiers Flows : ['projet-bdc-data/carmignac/Flows ENSAE V1 -20251027.csv', 'projet-bdc-data/carmignac/Flows ENSAE V2 -20251105.csv']\n",
|
|||
|
|
"Fichiers AUM : ['projet-bdc-data/carmignac/AUM ENSAE V1 -20251027.csv', 'projet-bdc-data/carmignac/AUM ENSAE V2 -20251105.csv']\n"
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"source": [
|
|||
|
|
"import os\n",
|
|||
|
|
"import s3fs\n",
|
|||
|
|
"import pandas as pd\n",
|
|||
|
|
"\n",
|
|||
|
|
"s3_ENDPOINT_URL = \"https://\" + os.environ[\"AWS_S3_ENDPOINT\"]\n",
|
|||
|
|
"\n",
|
|||
|
|
"fs = s3fs.S3FileSystem(client_kwargs={'endpoint_url': s3_ENDPOINT_URL})\n",
|
|||
|
|
"\n",
|
|||
|
|
"BUCKET = \"projet-bdc-data\"\n",
|
|||
|
|
"carmignac_path = \"projet-bdc-data/carmignac\"\n",
|
|||
|
|
"\n",
|
|||
|
|
"# Liste des fichiers FLOWS\n",
|
|||
|
|
"all_files = fs.ls(carmignac_path)\n",
|
|||
|
|
"flows_files = [f for f in all_files if \"Flows\" in f and f.endswith(\".csv\")]\n",
|
|||
|
|
"print(\"Fichiers Flows :\", flows_files)\n",
|
|||
|
|
"\n",
|
|||
|
|
"# Lire tous les fichiers dans un dictionnaire\n",
|
|||
|
|
"flows_data = {}\n",
|
|||
|
|
"for file_path in flows_files:\n",
|
|||
|
|
" with fs.open(file_path, 'r') as f:\n",
|
|||
|
|
" df = pd.read_csv(f, sep=';',low_memory=False)\n",
|
|||
|
|
" flows_data[os.path.basename(file_path)] = df\n",
|
|||
|
|
"\n",
|
|||
|
|
"\n",
|
|||
|
|
"# Liste des fichiers AUM\n",
|
|||
|
|
"all_files = fs.ls(carmignac_path)\n",
|
|||
|
|
"aum_files = [f for f in all_files if \"AUM\" in f and f.endswith(\".csv\")]\n",
|
|||
|
|
"print(\"Fichiers AUM :\", aum_files)\n",
|
|||
|
|
"\n",
|
|||
|
|
"# Lire tous les fichiers dans un dictionnaire\n",
|
|||
|
|
"aum_data = {}\n",
|
|||
|
|
"for file_path in aum_files:\n",
|
|||
|
|
" with fs.open(file_path, 'r') as f:\n",
|
|||
|
|
" df = pd.read_csv(f, sep=';',low_memory=False)\n",
|
|||
|
|
" aum_data[os.path.basename(file_path)] = df"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 8,
|
|||
|
|
"id": "bdfc2afe-c3aa-41b6-bb40-3a7bf2a39d9a",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [
|
|||
|
|
{
|
|||
|
|
"data": {
|
|||
|
|
"text/html": [
|
|||
|
|
"<div>\n",
|
|||
|
|
"<style scoped>\n",
|
|||
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|||
|
|
" vertical-align: middle;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"\n",
|
|||
|
|
" .dataframe tbody tr th {\n",
|
|||
|
|
" vertical-align: top;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"\n",
|
|||
|
|
" .dataframe thead th {\n",
|
|||
|
|
" text-align: right;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"</style>\n",
|
|||
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|||
|
|
" <thead>\n",
|
|||
|
|
" <tr style=\"text-align: right;\">\n",
|
|||
|
|
" <th></th>\n",
|
|||
|
|
" <th>Agreement - Code</th>\n",
|
|||
|
|
" <th>Company - Id</th>\n",
|
|||
|
|
" <th>Company - Ultimate Parent Id</th>\n",
|
|||
|
|
" <th>Registrar Account - ID</th>\n",
|
|||
|
|
" <th>Registrar Account - Region</th>\n",
|
|||
|
|
" <th>RegistrarAccount - Country</th>\n",
|
|||
|
|
" <th>Product - Asset Type</th>\n",
|
|||
|
|
" <th>Product - Strategy</th>\n",
|
|||
|
|
" <th>Product - Legal Status</th>\n",
|
|||
|
|
" <th>Product - Is Dedie ?</th>\n",
|
|||
|
|
" <th>...</th>\n",
|
|||
|
|
" <th>Centralisation Date</th>\n",
|
|||
|
|
" <th>Quantity - Subscription</th>\n",
|
|||
|
|
" <th>Quantity - Redemption</th>\n",
|
|||
|
|
" <th>Quantity - NetFlows</th>\n",
|
|||
|
|
" <th>Value Ccy - Subscription</th>\n",
|
|||
|
|
" <th>Value Ccy - Redemption</th>\n",
|
|||
|
|
" <th>Value Ccy - NetFlows</th>\n",
|
|||
|
|
" <th>Value € - Subscription</th>\n",
|
|||
|
|
" <th>Value € - Redemption</th>\n",
|
|||
|
|
" <th>Value € - NetFlows</th>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" </thead>\n",
|
|||
|
|
" <tbody>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>0</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200127202</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Equity</td>\n",
|
|||
|
|
" <td>Investissement</td>\n",
|
|||
|
|
" <td>SICAV</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>...</td>\n",
|
|||
|
|
" <td>2020-11-05</td>\n",
|
|||
|
|
" <td>1636.00</td>\n",
|
|||
|
|
" <td>0.000</td>\n",
|
|||
|
|
" <td>1636.000</td>\n",
|
|||
|
|
" <td>280983.00</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>280983.00</td>\n",
|
|||
|
|
" <td>280983.00</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>280983.00</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>1</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>406533</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>...</td>\n",
|
|||
|
|
" <td>2015-03-09</td>\n",
|
|||
|
|
" <td>144.69</td>\n",
|
|||
|
|
" <td>0.000</td>\n",
|
|||
|
|
" <td>144.690</td>\n",
|
|||
|
|
" <td>99985.13</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>99985.13</td>\n",
|
|||
|
|
" <td>99985.13</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>99985.13</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>2</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>406533</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Equity</td>\n",
|
|||
|
|
" <td>Investissement</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>...</td>\n",
|
|||
|
|
" <td>2016-10-26</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-8.321</td>\n",
|
|||
|
|
" <td>-8.321</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-9384.76</td>\n",
|
|||
|
|
" <td>-9384.76</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-9384.76</td>\n",
|
|||
|
|
" <td>-9384.76</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>3</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>406533</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Equity</td>\n",
|
|||
|
|
" <td>Investissement</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>...</td>\n",
|
|||
|
|
" <td>2018-10-18</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-22.083</td>\n",
|
|||
|
|
" <td>-22.083</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-25227.40</td>\n",
|
|||
|
|
" <td>-25227.40</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-25227.40</td>\n",
|
|||
|
|
" <td>-25227.40</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>4</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>406533</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Equity</td>\n",
|
|||
|
|
" <td>Investissement</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>...</td>\n",
|
|||
|
|
" <td>2019-04-08</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-465.992</td>\n",
|
|||
|
|
" <td>-465.992</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-563775.76</td>\n",
|
|||
|
|
" <td>-563775.76</td>\n",
|
|||
|
|
" <td>0.00</td>\n",
|
|||
|
|
" <td>-563775.76</td>\n",
|
|||
|
|
" <td>-563775.76</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" </tbody>\n",
|
|||
|
|
"</table>\n",
|
|||
|
|
"<p>5 rows × 24 columns</p>\n",
|
|||
|
|
"</div>"
|
|||
|
|
],
|
|||
|
|
"text/plain": [
|
|||
|
|
" Agreement - Code Company - Id Company - Ultimate Parent Id \\\n",
|
|||
|
|
"0 003 166 166 \n",
|
|||
|
|
"1 003 166 166 \n",
|
|||
|
|
"2 003 166 166 \n",
|
|||
|
|
"3 003 166 166 \n",
|
|||
|
|
"4 003 166 166 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Registrar Account - ID Registrar Account - Region \\\n",
|
|||
|
|
"0 200127202 France \n",
|
|||
|
|
"1 406533 France \n",
|
|||
|
|
"2 406533 France \n",
|
|||
|
|
"3 406533 France \n",
|
|||
|
|
"4 406533 France \n",
|
|||
|
|
"\n",
|
|||
|
|
" RegistrarAccount - Country Product - Asset Type Product - Strategy \\\n",
|
|||
|
|
"0 France Equity Investissement \n",
|
|||
|
|
"1 France Diversified Patrimoine \n",
|
|||
|
|
"2 France Equity Investissement \n",
|
|||
|
|
"3 France Equity Investissement \n",
|
|||
|
|
"4 France Equity Investissement \n",
|
|||
|
|
"\n",
|
|||
|
|
" Product - Legal Status Product - Is Dedie ? ... Centralisation Date \\\n",
|
|||
|
|
"0 SICAV NO ... 2020-11-05 \n",
|
|||
|
|
"1 FCP NO ... 2015-03-09 \n",
|
|||
|
|
"2 FCP NO ... 2016-10-26 \n",
|
|||
|
|
"3 FCP NO ... 2018-10-18 \n",
|
|||
|
|
"4 FCP NO ... 2019-04-08 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Quantity - Subscription Quantity - Redemption Quantity - NetFlows \\\n",
|
|||
|
|
"0 1636.00 0.000 1636.000 \n",
|
|||
|
|
"1 144.69 0.000 144.690 \n",
|
|||
|
|
"2 0.00 -8.321 -8.321 \n",
|
|||
|
|
"3 0.00 -22.083 -22.083 \n",
|
|||
|
|
"4 0.00 -465.992 -465.992 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Value Ccy - Subscription Value Ccy - Redemption Value Ccy - NetFlows \\\n",
|
|||
|
|
"0 280983.00 0.00 280983.00 \n",
|
|||
|
|
"1 99985.13 0.00 99985.13 \n",
|
|||
|
|
"2 0.00 -9384.76 -9384.76 \n",
|
|||
|
|
"3 0.00 -25227.40 -25227.40 \n",
|
|||
|
|
"4 0.00 -563775.76 -563775.76 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Value € - Subscription Value € - Redemption Value € - NetFlows \n",
|
|||
|
|
"0 280983.00 0.00 280983.00 \n",
|
|||
|
|
"1 99985.13 0.00 99985.13 \n",
|
|||
|
|
"2 0.00 -9384.76 -9384.76 \n",
|
|||
|
|
"3 0.00 -25227.40 -25227.40 \n",
|
|||
|
|
"4 0.00 -563775.76 -563775.76 \n",
|
|||
|
|
"\n",
|
|||
|
|
"[5 rows x 24 columns]"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"execution_count": 8,
|
|||
|
|
"metadata": {},
|
|||
|
|
"output_type": "execute_result"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"source": [
|
|||
|
|
"df = flows_data['Flows ENSAE V2 -20251105.csv']\n",
|
|||
|
|
"df.head()"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 9,
|
|||
|
|
"id": "6af3bcd9-0a54-4087-a8cf-203fb6f8a947",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [
|
|||
|
|
{
|
|||
|
|
"data": {
|
|||
|
|
"text/html": [
|
|||
|
|
"<div>\n",
|
|||
|
|
"<style scoped>\n",
|
|||
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|||
|
|
" vertical-align: middle;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"\n",
|
|||
|
|
" .dataframe tbody tr th {\n",
|
|||
|
|
" vertical-align: top;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"\n",
|
|||
|
|
" .dataframe thead th {\n",
|
|||
|
|
" text-align: right;\n",
|
|||
|
|
" }\n",
|
|||
|
|
"</style>\n",
|
|||
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|||
|
|
" <thead>\n",
|
|||
|
|
" <tr style=\"text-align: right;\">\n",
|
|||
|
|
" <th></th>\n",
|
|||
|
|
" <th>Agreement - Code</th>\n",
|
|||
|
|
" <th>Company - Id</th>\n",
|
|||
|
|
" <th>Company - Ultimate Parent Id</th>\n",
|
|||
|
|
" <th>Registrar Account - ID</th>\n",
|
|||
|
|
" <th>Registrar Account - Region</th>\n",
|
|||
|
|
" <th>RegistrarAccount - Country</th>\n",
|
|||
|
|
" <th>Product - Asset Type</th>\n",
|
|||
|
|
" <th>Product - Strategy</th>\n",
|
|||
|
|
" <th>Product - Legal Status</th>\n",
|
|||
|
|
" <th>Product - Is Dedie ?</th>\n",
|
|||
|
|
" <th>Product - Fund</th>\n",
|
|||
|
|
" <th>Product - Shareclass Type</th>\n",
|
|||
|
|
" <th>Product - Shareclass Currency</th>\n",
|
|||
|
|
" <th>Product - Isin</th>\n",
|
|||
|
|
" <th>Centralisation Date</th>\n",
|
|||
|
|
" <th>Quantity - AUM</th>\n",
|
|||
|
|
" <th>Value - AUM CCY</th>\n",
|
|||
|
|
" <th>Value - AUM €</th>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" </thead>\n",
|
|||
|
|
" <tbody>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>0</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200000647</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>Carmignac Patrimoine</td>\n",
|
|||
|
|
" <td>A</td>\n",
|
|||
|
|
" <td>EUR</td>\n",
|
|||
|
|
" <td>FR0010135103</td>\n",
|
|||
|
|
" <td>2015-03-31</td>\n",
|
|||
|
|
" <td>35.368</td>\n",
|
|||
|
|
" <td>24648.6666</td>\n",
|
|||
|
|
" <td>24648.6666</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>1</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200000647</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>Carmignac Patrimoine</td>\n",
|
|||
|
|
" <td>A</td>\n",
|
|||
|
|
" <td>EUR</td>\n",
|
|||
|
|
" <td>FR0010135103</td>\n",
|
|||
|
|
" <td>2015-11-30</td>\n",
|
|||
|
|
" <td>35.368</td>\n",
|
|||
|
|
" <td>22413.0553</td>\n",
|
|||
|
|
" <td>22413.0553</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>2</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200000647</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>Carmignac Patrimoine</td>\n",
|
|||
|
|
" <td>A</td>\n",
|
|||
|
|
" <td>EUR</td>\n",
|
|||
|
|
" <td>FR0010135103</td>\n",
|
|||
|
|
" <td>2015-12-31</td>\n",
|
|||
|
|
" <td>35.368</td>\n",
|
|||
|
|
" <td>22051.2406</td>\n",
|
|||
|
|
" <td>22051.2406</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>3</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200000647</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>Carmignac Patrimoine</td>\n",
|
|||
|
|
" <td>A</td>\n",
|
|||
|
|
" <td>EUR</td>\n",
|
|||
|
|
" <td>FR0010135103</td>\n",
|
|||
|
|
" <td>2016-03-31</td>\n",
|
|||
|
|
" <td>35.368</td>\n",
|
|||
|
|
" <td>21626.1173</td>\n",
|
|||
|
|
" <td>21626.1173</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" <tr>\n",
|
|||
|
|
" <th>4</th>\n",
|
|||
|
|
" <td>003</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>166</td>\n",
|
|||
|
|
" <td>200000647</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>France</td>\n",
|
|||
|
|
" <td>Diversified</td>\n",
|
|||
|
|
" <td>Patrimoine</td>\n",
|
|||
|
|
" <td>FCP</td>\n",
|
|||
|
|
" <td>NO</td>\n",
|
|||
|
|
" <td>Carmignac Patrimoine</td>\n",
|
|||
|
|
" <td>A</td>\n",
|
|||
|
|
" <td>EUR</td>\n",
|
|||
|
|
" <td>FR0010135103</td>\n",
|
|||
|
|
" <td>2016-11-30</td>\n",
|
|||
|
|
" <td>35.368</td>\n",
|
|||
|
|
" <td>22489.4502</td>\n",
|
|||
|
|
" <td>22489.4502</td>\n",
|
|||
|
|
" </tr>\n",
|
|||
|
|
" </tbody>\n",
|
|||
|
|
"</table>\n",
|
|||
|
|
"</div>"
|
|||
|
|
],
|
|||
|
|
"text/plain": [
|
|||
|
|
" Agreement - Code Company - Id Company - Ultimate Parent Id \\\n",
|
|||
|
|
"0 003 166 166 \n",
|
|||
|
|
"1 003 166 166 \n",
|
|||
|
|
"2 003 166 166 \n",
|
|||
|
|
"3 003 166 166 \n",
|
|||
|
|
"4 003 166 166 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Registrar Account - ID Registrar Account - Region \\\n",
|
|||
|
|
"0 200000647 France \n",
|
|||
|
|
"1 200000647 France \n",
|
|||
|
|
"2 200000647 France \n",
|
|||
|
|
"3 200000647 France \n",
|
|||
|
|
"4 200000647 France \n",
|
|||
|
|
"\n",
|
|||
|
|
" RegistrarAccount - Country Product - Asset Type Product - Strategy \\\n",
|
|||
|
|
"0 France Diversified Patrimoine \n",
|
|||
|
|
"1 France Diversified Patrimoine \n",
|
|||
|
|
"2 France Diversified Patrimoine \n",
|
|||
|
|
"3 France Diversified Patrimoine \n",
|
|||
|
|
"4 France Diversified Patrimoine \n",
|
|||
|
|
"\n",
|
|||
|
|
" Product - Legal Status Product - Is Dedie ? Product - Fund \\\n",
|
|||
|
|
"0 FCP NO Carmignac Patrimoine \n",
|
|||
|
|
"1 FCP NO Carmignac Patrimoine \n",
|
|||
|
|
"2 FCP NO Carmignac Patrimoine \n",
|
|||
|
|
"3 FCP NO Carmignac Patrimoine \n",
|
|||
|
|
"4 FCP NO Carmignac Patrimoine \n",
|
|||
|
|
"\n",
|
|||
|
|
" Product - Shareclass Type Product - Shareclass Currency Product - Isin \\\n",
|
|||
|
|
"0 A EUR FR0010135103 \n",
|
|||
|
|
"1 A EUR FR0010135103 \n",
|
|||
|
|
"2 A EUR FR0010135103 \n",
|
|||
|
|
"3 A EUR FR0010135103 \n",
|
|||
|
|
"4 A EUR FR0010135103 \n",
|
|||
|
|
"\n",
|
|||
|
|
" Centralisation Date Quantity - AUM Value - AUM CCY Value - AUM € \n",
|
|||
|
|
"0 2015-03-31 35.368 24648.6666 24648.6666 \n",
|
|||
|
|
"1 2015-11-30 35.368 22413.0553 22413.0553 \n",
|
|||
|
|
"2 2015-12-31 35.368 22051.2406 22051.2406 \n",
|
|||
|
|
"3 2016-03-31 35.368 21626.1173 21626.1173 \n",
|
|||
|
|
"4 2016-11-30 35.368 22489.4502 22489.4502 "
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"execution_count": 9,
|
|||
|
|
"metadata": {},
|
|||
|
|
"output_type": "execute_result"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"source": [
|
|||
|
|
"dg = aum_data['AUM ENSAE V2 -20251105.csv']\n",
|
|||
|
|
"dg.head()"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 10,
|
|||
|
|
"id": "1d9cd20d-2e79-47b8-91f1-09fee4962dc6",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [],
|
|||
|
|
"source": [
|
|||
|
|
"df_ids = set(df['Registrar Account - ID'].unique())\n",
|
|||
|
|
"dg_ids = set(dg['Registrar Account - ID'].unique())\n",
|
|||
|
|
"\n",
|
|||
|
|
"intersect = df_ids & dg_ids # comptes dans les deux\n",
|
|||
|
|
"only_df = df_ids - dg_ids # comptes seulement dans df\n",
|
|||
|
|
"only_dg = dg_ids - df_ids # comptes seulement dans dg\n"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 11,
|
|||
|
|
"id": "1a374690-119e-4bbb-a12d-13d0305780ad",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [
|
|||
|
|
{
|
|||
|
|
"name": "stdout",
|
|||
|
|
"output_type": "stream",
|
|||
|
|
"text": [
|
|||
|
|
" Comptes présents\n",
|
|||
|
|
"Seulement dans df 118\n",
|
|||
|
|
"Seulement dans dg 5777\n",
|
|||
|
|
"Dans les deux 6724\n"
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"source": [
|
|||
|
|
"summary = pd.DataFrame({\n",
|
|||
|
|
" \"Comptes présents\": [\n",
|
|||
|
|
" len(only_df),\n",
|
|||
|
|
" len(only_dg),\n",
|
|||
|
|
" len(intersect)\n",
|
|||
|
|
" ]\n",
|
|||
|
|
"}, index=[\"Seulement dans df\", \"Seulement dans dg\", \"Dans les deux\"])\n",
|
|||
|
|
"\n",
|
|||
|
|
"print(summary)\n"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": null,
|
|||
|
|
"id": "1b35a706-e94b-4bbb-8255-be5de03cb33b",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [],
|
|||
|
|
"source": [
|
|||
|
|
"aum_max = dg.groupby('Registrar Account - ID')['Quantity - AUM'].max()\n",
|
|||
|
|
"accounts_always_zero = aum_max[aum_max == 0].index\n",
|
|||
|
|
"\n",
|
|||
|
|
"accounts_always_zero_set = set(accounts_always_zero)\n",
|
|||
|
|
"\n",
|
|||
|
|
"intersection = accounts_always_zero_set & only_dg\n",
|
|||
|
|
"\n",
|
|||
|
|
"print(\"Nombre de comptes dans les deux :\", len(intersection))\n",
|
|||
|
|
"print(\"Liste des comptes :\", intersection)\n"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": 13,
|
|||
|
|
"id": "25836642-a7c3-489d-9ece-eec73a2121ef",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [
|
|||
|
|
{
|
|||
|
|
"name": "stdout",
|
|||
|
|
"output_type": "stream",
|
|||
|
|
"text": [
|
|||
|
|
"{'366352', '259287', '419301', '366391', '200001352', '366032', '405179', '422240', '406010', '406402', '200001415', '420284', '364637', '403987', '406310', '200126238', '365884', '364678', '405102', '403903', '414054', '364762', '419183', '404195', '409651', '411485', '365998', '365870', '405453', '420465', '420156', '412439', '416412', '406432', '200137985', '419158', '405372', '363727', '365408', '404765', '365007', '200097114', '51034', '406226', '365465', '200137890', '365003', '404928', '365529', '365983', '200126263', '404021', '200001940', '365879', '416971', '364557', '364927', '406721', '415132', '404863', '366626', '406316', '406373', '405999', '200001499', '364636', '404831', '366369', '200142172', '200142169', '420351', '365180', '414272', '422742', '413369', '200000356', '418643', '419767', '416490', '366409', '364909', '365271', '365011', '406246', '348516', '417943', '402939', '413249', '422719', '406500', '418578', '57380', '402703', '419314', '365912', '364779', '419891', '405240', '406496', '406046', '411984', '420471', '412560', '405072', '417054', '200126244', '200137629', '366510', '406272', '200000655', '200001910', '405870', '200037082', '416136', '365359', '411397', '364699', '406357', '409423', '416528', '366545', '406367', '419706', '411973', '364729', '364912', '200136676', '419925', '200000562', '365459', '64043', '418551', '419763', '422633', '39616', '200009007', '417587', '348497', '406466', '365069', '200130407', '58262', '365621', '410773', '364795', '365671', '416956', '412840', '364945', '365968', '420398', '365654', '405643', '403153', '418996', '419672', '365487', '416360', '413295', '415813', '200054817', '365175', '200139330', '364580', '406314', '419173', '200001469', '412972', '365111', '100000038', '200000034', '417665', '402782', '422607', '405276', '402619', '348512', '418885', '366617', '404581', '403719', '402400', '414238', '364778', '402780', '419234', '420495', '413294', '364968', '405281', '405715', '406031', '200032262', '365856', '365655', '200138925', '365716', '366407', '200011270', '200001618', '406323', '200127798', '422731', '402785', '405712', '200139463', '365349', '365077', '366599', '200100652', '411821', '418176', '402601', '200030451', '404979', '366374', '406593', '364944', '365437', '404715', '404062', '365497', '365952', '365987', '403611', '406179', '365038', '406195', '419023', '420314', '365877', '200000378', '200009151', '413819', '403898', '419870', '402887', '200130692', '365057', '419704', '412760', '364897', '363600', '418474', '200101623', '366371', '405554', '418510', '365436', '411836', '422740', '200000331', '422522', '404569', '414698', '419205', '365401', '404424', '364690', '405011', '403602', '200130473', '406237', '200131171', '200000484', '53681', '419904', '411777', '419795', '364991', '364706', '416674', '364620', '404741', '406697', '200057701', '8416', '300888', '365367', '365981', '405224', '365471', '406313', '420497', '200001855', '405725', '365159', '418604', '419669', '415009', '300300', '418607', '200001815', '416627', '419923', '404638', '404518', '418085', '366362', '200142171', '413638', '200063222', '364570', '412764', '366607', '416159', '413181', '366507', '412582', '406058', '412657', '418218', '418896', '415147', '412003', '404612', '365722', '200001431', '404828', '366402', '365531', '342509', '364973', '365352', '362000', '365698', '412263', '405350', '419974', '417563', '200131083', '405247', '405927', '403018', '404415', '420006', '365755', '422734', '364900', '406617', '404164', '404073', '418845', '419243', '364260', '200001342', '406138', '422302', '418644', '420190', '200000103', '365652', '13323', '366342', '364964', '417023', '418784', '402570', '419497', '420072', '405374', '404334', '418766', '418892', '365439', '365572', '415125', '418624', '365321', '365568', '422903', '365157', '416675', '364833', '365165', '403056', '415063', '406555', '366498', '405771', '412569', '414188', '200137725', '365425', '366064', '365883', '200051873', '366002', '422230', '200076686', '415470', '417853', '420380', '366
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"source": [
|
|||
|
|
"print(only_dg)"
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"cell_type": "code",
|
|||
|
|
"execution_count": null,
|
|||
|
|
"id": "6317cd0d-ef16-4786-853f-6f521d556393",
|
|||
|
|
"metadata": {},
|
|||
|
|
"outputs": [],
|
|||
|
|
"source": []
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"metadata": {
|
|||
|
|
"kernelspec": {
|
|||
|
|
"display_name": "Python 3 (ipykernel)",
|
|||
|
|
"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.13.8"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"nbformat": 4,
|
|||
|
|
"nbformat_minor": 5
|
|||
|
|
}
|