RMI-PACTA / PACTA_analysis

Run the PACTA analysis on EQ & CB portfolios
Other
25 stars 70 forks source link

Move calculation of portfolio weights to the first input check step #68

Closed Clare2D closed 3 years ago

Clare2D commented 4 years ago

To get the portfolio weights for E4I from the first step; we should move this to the portfolio_input_check particularly in the web tool

Clare2D commented 4 years ago

Not urgent, but important for the webtool.

Clare2D commented 4 years ago

@2diiKlaus As discussed with Klaus, we just need one output for the CAG - it would be a dataframe with company_id and portfolio weight saved as something relevant coming out of web_script_1.

jacobvjk commented 4 years ago

@Clare2D am I right to assume that want this to be consistent between the web_tool and the offline tool? At first glance, I would do the following:

Any opinion on that?

Clare2D commented 4 years ago

Isn't the online tool looping over portfolio rather than investor? I would assume this almost doesn't matter as the group_by should do the grouping anyway? I think this function can be moved almost as is to the script 1 & 2_project_input_analysis, but agree that it should be moved for both for consistency. Output data frames to 30_proc_inputs is correct

I don't get your final point though..

jacobvjk commented 4 years ago

final point was about always writing those files to 30_Processed_Inputs or optionally writing them there. Which only is optional if both scripts are run in the same session of course, so I suggest we just ignore my last point

jacobvjk commented 4 years ago

And no, the webtool is not looping over portfolios. We removed that again, because every run will either be a single PF or a merged PF in the webtool. The loop over investors does not do anything in the webtool as it is always just 1 investor, but the functions were copied from the offline tool as is. therefore there still is a loop and I would prefer to keep it somewhat in sync with the way it's run in master.

Clare2D commented 4 years ago

Ok that makes sense!

On Mon, Sep 14, 2020 at 5:16 PM jacobvjk notifications@github.com wrote:

And no, the webtool is not looping over portfolios. We removed that again, because every run will either be a single PF or a merged PF in the webtool. The loop over investors does not do anything in the webtool as it is always just 1 investor, but the functions were copied from the offline tool as is. therefore there still is a loop and I would prefer to keep it somewhat in sync with the way it's run in master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2DegreesInvesting/PACTA_analysis/issues/68#issuecomment-692126098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3BDIA7SEMFIRJQQM7BS33SFYXWDANCNFSM4P4RC3UA .

Clare2D commented 3 years ago

Wir würden dafür das Total Portfolio nehmen und dann daraus die folgenden Spalten nutzen: company_id portfolio_weight (das ist ja aktuell noch nicht Teil der Datei soweit ich das sehe) Aktuell ist das total_portfolio auch nur als rda verfügbar, Wim würde es bevorzugt als json Datei bekommen Soweit wie ich das sehe müssen dafür 2 Dinge getan werden: die portfolio_weights müssen berechnet und ausgegeben werden der output sollte als json verfügbar sein

@2diiKlaus