Skip to main content

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 trimestral 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.

♻️Update 1.0.2♻️: Correcciones ortográficas.

♻️Update 1.0.3♻️: Limitación del "split" con max 1 para separar ISIN del Nombre .


💥 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']]

💡 Prerequisitos

Python 3


🛠️ 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!


https://www.linkedin.com/in/atroyano/

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.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnmv_data-1.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file cnmv_data-1.0.3.tar.gz.

File metadata

  • Download URL: cnmv_data-1.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for cnmv_data-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e6acf32742e5d1c4040c8270b441248640a64ba1a17c87ac680cefe774c35b8d
MD5 9fe72304f2872f1e39b34df3d428a112
BLAKE2b-256 87a0682daf399eb125bc218efe897154f399a911499c819d0fa0921c101e8bb3

See more details on using hashes here.

File details

Details for the file cnmv_data-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: cnmv_data-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for cnmv_data-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bfe99b7b4d1da6ffdadd22cd006a6f92b7a7fab9dd1d3b09f812f92599f1937a
MD5 fcc6c63f065b6c791a37af2f7ed69644
BLAKE2b-256 d36fdda2d23fa4bd6480cc74186cb09e99e5c30cbb6551bedf0af307b96ce81d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page