For the code in Portfolio I want there to be some plotters that make sure that we can display all the important information. Each plotter though should take care of only one part of the portfolio and not explain the whole portfolio. So we proceed now with the first plotter and move on one by one. For everyone of these plots there are going to be ome values that are particularly importnat, you should print those always right before plotting the plot as an image completely

Asset Class Exposure

The first aspect we want to display of a portfolio is its exposure to every asset type, we distinguish therefre, etfs, stocks, bonds etc and display them. There should be plots that are given as outputs but what is also very importnat is that we shall distinguish the cases in which the exposure in percentage sums up to 100% or lower or when it goes above 100%. This may happen because of leverage, if I have all invested fors instance in a 2x etf, then my exposure to the stock etfs is 200%. In fact we should count the leverage for the exposure analysis by asset class. In both cases you should display an istogram with on the y axis the percentage of the total portfolio (on the left) and the total amount in euros on the right. On the x axis we have the different asset classes, this should be a plot divided in columns, like an istogram. You should count the leverage by its factor and display it in a different colour. All the plots that we are going to plot need to have about the same style, which should be in a black and white, with greys and some red details but nothing more than that, no other colour.

Geographical and Currency Exposure

Here you should take all the gepgraphical data that are given and plot them, since the data are discrete (the different regions) you should also give an istogram and simply make anotherone for the currency exposure. For the currency exposure you should though make sure to count the etfs correctly, in fact even if an etf is denominated in euros it does not mean that tht etf is exposed to euros only or predonminantely or at all. In fact if I have a global etf that I buy in a german stock excgange then I should not count that as an exposure to euros. So if we have some geographical distribution we should also use tit for etfs to determine the currency, so we should also have a Global currency that is the general most used currency and the one we should refer to if there are some global etfs. For the geographical data we should consider these:

INSTRUMENT_TYPES = [‘stock’, ‘ETF’, ‘bond’, ‘other’] ETF_SUBTYPES = [‘stocks’, ‘bonds’, ‘mixed’] GEOGRAPHIES = [‘USA’, ‘Europe’, ‘Emerging markets’, ‘China’, ‘Global’, ‘Else’]

InstrumentType = Literal[‘stock’, ‘ETF’, ‘bond’, ‘other’] ETFSubtype = Literal[‘stocks’, ‘bonds’, ‘mixed’] Geography = Literal[‘USA’, ‘Europe’, ‘Emerging markets’, ‘China’, ‘Global’, ‘Else’]

whichi is the code about it that we find on LiquidAsset. The currencies though also appear in the various items like liquidity. Credit should also be counted in the currency. The IlliquidItems should not be counted in any currency as they are just items that are not relative to any currency, like a macbook or a house. Regarding the debit you should also display it in the currency exposure but it should be separate from the positive assets, so in the istogram where we display all of this you should add a negative part (negative column) where the debit can be displayed. As always keep the same grey, black and white style with red details and put the percentage on the left and the absolute values on the right, absolute values should be in euros but the columns should display the value that they represent in their own currency. so for isntance we can have a column that is 100 euros tall that represents the francs and that says 90 francs on it. Make sure that anything that is written is readable very well. So there should be two polts that come out of this, one is the istogram for the geographical distribution of invested assets, and that only concenrs the LiquidAssets and then we have the currency distribution which concenrs every asset other than the illiquid assets. For all the currencies I exposed here you clearly need to import the right packages like moneyed and such and use the already uploaded and attached Fianncial Classes.

Past values and Foreseable Cashflow

You should in this plot only take into acocunt hte credits and debits that are listed in the portfolio and its total amount, there you should display the value of the portfolio and update it every day with teh cashflow that is expected, there are in fact credits and debits that are either regular or have some expected amounts that should be given periodically or at a precise time in the future and what you should do is first of all decide a time span, you should leave it as an input to the funciton that plots and it should be therefore taking as input an integer that asks how many years in advance you want to look. Also you should be asking for some other values, like if we should consider the revenues from the invested capital or not, there you should assume by default a negative answer and you should but if the answer was positive you should ask for every asset class that is present in the porfolio which static performance we should assume in the future, by default assume 10% for stocks and 4% for bonds, etfs should be coutned as stocks or bonds by their composition, so if I have a 60 / 40 etf I should split it between those two classes. You should also ask if we should count or not the Housing Market increase, by default not but if so, then the growth rate is set by default to 1%, that clearly applies only to houses. The plot should be a sort of cartesian plane with a line that starts at the initial portfolio value and is updated all the time the x axis has the time, the y axis has the percentage growth on the left and the euros values on the right. Make sure that the 0 euros line is remarked in a light gray and that the style is always the same coherent style inblack white gray with red details.

Something that I want to add to this plot is also the display of the past. In fact to the fucniton that generates this plot you should have one value to say how many years in teh future you want to look but also nother one that says how many years in the past. Now you dont have many data available in the past because I did not add the history function yet, what you should do though is to take as a starting point the data that are in acutal contants and I am going to add there every time some assets and everytime I do so they are going to be indexed by a date, this will allow you to look backwards and estimate the past value of the portfolio by knowing what were the assets that made up the portfolio at the time and using yahoo finance (but only use the tools on the Helper for FetchStockPrice) you are going to be able to know what was the value of those assets at that time. You should display the past on the same plot and have a red thin dashed vertical line that determins the present moment. Update all data day by day. Also all the valeus should be in euros, that is very important too.

Most Relevant Assets

This is not going to be a plot but just printing some assets here and there and what you should do here is just take the 10 most relevant assets in the portfolio and list them, that means that you should simply display them and print the most important information about each one of them which depend on which class they are part of.