mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-12 06:34:43 +02:00
feat(finlab): portefeuilles multi-comptes (courtier/banque) + onglets dashboard
Permet de suivre plusieurs comptes (courtiers/banques) côte à côte, avec vue par compte et agrégée. Ajoute le PEA BNP Paribas à côté de Revolut. - portfolio.yaml : nouveau format `accounts` (name/type/cash/positions par compte). Compat ascendante : ancien format (cash/positions à la racine) lu comme compte unique « Principal » - data.py : load_accounts(), base_currency(), portfolio_tickers() (union dédupliquée) - tracker.py : build_account / build_all (par compte + agrégat global) ; build() reste la vue globale (digest/report) ; report() multi-comptes - scanner/technical/alerts : helpers « portfolio » → union de tous les comptes - dashboard /api/portfolio : renvoie accounts[] (positions+agg par compte) + global - dashboard front : onglets de comptes (Tous / Revolut / BNP Paribas), KPI + positions + secteurs qui suivent le périmètre sélectionné, badge de type par ligne en vue Tous - BNP Paribas (PEA) saisi depuis la capture : AI/PAEEM/DCAM/PCEU/PSP5/BNP/ENGI/TTE .PA (tickers Yahoo vérifiés, cours conformes à la capture) Vérifié : totaux conformes à la capture BNP (6 395,49 € ; P&L -39 €), global 22 444 € ; bascule d'onglet OK au navigateur (Playwright) ; compile + JS + CLI report OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ba45ca198b
commit
3b43025895
10 changed files with 246 additions and 158 deletions
|
|
@ -1,64 +1,44 @@
|
|||
# Portefeuille Revolut — Compte de courtage
|
||||
# base_currency : devise de référence pour la valorisation/P&L
|
||||
# Portefeuilles multi-comptes (courtiers / banques).
|
||||
# base_currency : devise de référence pour la valorisation/P&L agrégés.
|
||||
# Chaque compte : name, type (courtier|banque|pea|crypto…), cash, positions.
|
||||
# ticker : symbole Yahoo Finance (suffixe .PA / .AS pour les places EU)
|
||||
# shares : quantité détenue
|
||||
# avg_price : prix de revient unitaire (PRU)
|
||||
# avg_currency : devise du PRU
|
||||
#
|
||||
# (Compat : un fichier à l'ancien format — cash/positions au niveau racine, sans
|
||||
# `accounts` — reste lu comme un compte unique « Principal ».)
|
||||
base_currency: EUR
|
||||
|
||||
# Liquidités
|
||||
cash:
|
||||
amount: 1248.44
|
||||
currency: EUR
|
||||
accounts:
|
||||
- name: Revolut
|
||||
type: courtier
|
||||
cash:
|
||||
amount: 1248.44
|
||||
currency: EUR
|
||||
positions:
|
||||
- { ticker: NVDA, shares: 16.5959374, avg_price: 203.52, avg_currency: USD } # NVIDIA
|
||||
- { ticker: ASML, shares: 1.5839474, avg_price: 1894.00, avg_currency: USD } # ASML (ADR, Nasdaq)
|
||||
- { ticker: AMD, shares: 3.21341326, avg_price: 525.68, avg_currency: USD } # AMD
|
||||
- { ticker: MU, shares: 1.44801383, avg_price: 994.62, avg_currency: USD } # Micron
|
||||
- { ticker: STX, shares: 1.51530962, avg_price: 996.27, avg_currency: USD } # Seagate
|
||||
- { ticker: ASML.AS, shares: 0.86432993, avg_price: 1550.60, avg_currency: EUR } # ASML (Amsterdam)
|
||||
- { ticker: DELL, shares: 3.11943017, avg_price: 368.28, avg_currency: USD } # Dell
|
||||
- { ticker: TTE.PA, shares: 17.74026299, avg_price: 73.14, avg_currency: EUR } # TotalEnergies
|
||||
- { ticker: AAPL, shares: 3.39814436, avg_price: 294.28, avg_currency: USD } # Apple
|
||||
- { ticker: HPE, shares: 13.32018017, avg_price: 43.45, avg_currency: USD } # HPE
|
||||
|
||||
# Positions
|
||||
# ticker : symbole Yahoo Finance (suffixe .AS / .PA pour les places EU)
|
||||
# shares : quantité détenue
|
||||
# avg_price : prix de revient unitaire (Prix moyen Revolut)
|
||||
# avg_currency: devise du prix de revient
|
||||
positions:
|
||||
- ticker: NVDA # NVIDIA
|
||||
shares: 16.5959374
|
||||
avg_price: 203.52
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: ASML # ASML Holding (ADR, Nasdaq)
|
||||
shares: 1.5839474
|
||||
avg_price: 1894.00
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: AMD # Advanced Micro Devices
|
||||
shares: 3.21341326
|
||||
avg_price: 525.68
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: MU # Micron Technology
|
||||
shares: 1.44801383
|
||||
avg_price: 994.62
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: STX # Seagate Technology
|
||||
shares: 1.51530962
|
||||
avg_price: 996.27
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: ASML.AS # ASML Holding N.V. (Amsterdam, EUR)
|
||||
shares: 0.86432993
|
||||
avg_price: 1550.60
|
||||
avg_currency: EUR
|
||||
|
||||
- ticker: DELL # Dell Technologies
|
||||
shares: 3.11943017
|
||||
avg_price: 368.28
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: TTE.PA # TotalEnergies SE (Paris, EUR)
|
||||
shares: 17.74026299
|
||||
avg_price: 73.14
|
||||
avg_currency: EUR
|
||||
|
||||
- ticker: AAPL # Apple
|
||||
shares: 3.39814436
|
||||
avg_price: 294.28
|
||||
avg_currency: USD
|
||||
|
||||
- ticker: HPE # Hewlett Packard Enterprise
|
||||
shares: 13.32018017
|
||||
avg_price: 43.45
|
||||
avg_currency: USD
|
||||
- name: BNP Paribas (PEA)
|
||||
type: banque
|
||||
cash:
|
||||
amount: 46.34
|
||||
currency: EUR
|
||||
positions:
|
||||
- { ticker: AI.PA, shares: 1, avg_price: 170.73, avg_currency: EUR } # Air Liquide
|
||||
- { ticker: PAEEM.PA, shares: 30, avg_price: 36.461, avg_currency: EUR } # Amundi PEA MSCI Emerging Markets
|
||||
- { ticker: DCAM.PA, shares: 180, avg_price: 6.025, avg_currency: EUR } # Amundi PEA MSCI World
|
||||
- { ticker: PCEU.PA, shares: 30, avg_price: 39.517, avg_currency: EUR } # Amundi PEA MSCI Europe
|
||||
- { ticker: PSP5.PA, shares: 20, avg_price: 56.883, avg_currency: EUR } # Amundi PEA S&P 500
|
||||
- { ticker: BNP.PA, shares: 8, avg_price: 102.90, avg_currency: EUR } # BNP Paribas
|
||||
- { ticker: ENGI.PA, shares: 20, avg_price: 27.08, avg_currency: EUR } # Engie
|
||||
- { ticker: TTE.PA, shares: 5, avg_price: 70.26, avg_currency: EUR } # TotalEnergies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue