Extracción desde PDF de la cartera de inversión reportada por Fondos de Inversión a la CNMV
Project description
CNMV Portfolio extraction
https://pypi.org/project/cnmv-data/1.0.1/
Por Antonio Fernández Troyano - https://www.fernandeztroyano.es
------------------------------ Librería que te permite **extraer las carteras reportadas por los Fondos de Inversión de manera trimestrar a la CNMV en formato PDF**.
Para utilizarlo simplemente necesitas disponer de un fichero PDF del FI en el que se incluya la cartera y siga el formato exigido por la CNMV. Básicamente la tabla reportada incluye los siguientes datos:
- ISIN + Nombre de la empresa
- Divisa
- Valor de mercado actual
- % sobre el total del fondo actual
- Valor de mercado del pasado trimestre
- % sobre el total del fondo del último trimestre
♻️Update 1.0.1♻️: En el output se separan el ISIN del nombre del producto.
[['US0082521081', 'ACCIONES|Affiliated Managers Group', 'USD', '2.071', '0,80', '0', '0,00'],
['FR0011476928', 'ACCIONES|Fnac Darty SA', 'EUR', '222', '0,09', '0', '0,00'],
['US5006881065', 'ACCIONES|Kosmos Energy LTD', 'USD', '3.145', '1,22', '4.726', '1,05'],
['IT0005252140', 'ACCIONES|Saipem SPA', 'EUR', '2.631', '1,02', '5.321', '1,18']]
💡 Prerequisitos
🛠️ Instalación:
Con PyPI
pip3 install cnmv_data
📚 Ejemplo de uso
from cnmv_data import get_portfolio
get_portfolio('.\Q1.pdf')
💥 Output
[['US0082521081', 'ACCIONES|Affiliated Managers Group', 'USD', '2.071', '0,80', '0', '0,00'],
['FR0011476928', 'ACCIONES|Fnac Darty SA', 'EUR', '222', '0,09', '0', '0,00'],
['US5006881065', 'ACCIONES|Kosmos Energy LTD', 'USD', '3.145', '1,22', '4.726', '1,05'],
['IT0005252140', 'ACCIONES|Saipem SPA', 'EUR', '2.631', '1,02', '5.321', '1,18']]
Se puede convertir directamente en un DataFrame:
pd.DataFrame(result, columns = ['ISIN', 'Nombre', 'Divisa', 'Actual_VM', 'Actual_%', 'Pasado_VM', Pasado_%'])
ISIN | Nombre | Divisa | Actual_VM | Actual_% | Pasado_VM | Pasado_% |
---|---|---|---|---|---|---|
US0082521081 | ACCIONES Affiliated Managers Group | USD | 2.071 | 0,80 | 0 | 0,00 |
FR0011476928 | ACCIONES Fnac Darty SA | EUR | 222 | 0,09 | 0 | 0,00 |
US5006881065 | ACCIONES Kosmos Energy LTD | USD | 3.145 | 1,22 | 4.726 | 1,05 |
IT0005252140 | ACCIONES Saipem SPA | EUR | 2.631 | 1,02 | 5.321 | 1,18 |
🐸 Aloha!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnmv_data-1.0.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for cnmv_data-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c61e6b25fb252650644b45fb53cd68f08252c8a4fc69f4742c1894ec7a58a831 |
|
MD5 | 2cd9de53230db5d4bf2ab5a2a8243015 |
|
BLAKE2b-256 | 17d127bf3258deb1450d338094382e48f343b2a05e67236beb25f00310f98ae4 |