-
Notifications
You must be signed in to change notification settings - Fork 70
PACTA erroneously incuding short positions #463
Comments
thanks @FrederickFa! excellent details @jacobvjk you seemed to have had very specific reasons for this in #310, can you advise? |
@cjyetman yes I did. My context at the time was from the EIOPA project, where such small weights still sometimes represented sizeable sums, when looking at the entire European insurance sector. We wanted to ensure the same holdings remain in the analysis regardless of how you slice and dice the input portfolios. Of course, I did not anticipate that this was also the single place to ensure we do not take short positions into account. And I think it's a bad way to filter out short positions. It should at least take into account the market value as a criterion and b something like I am still not aware if there is supposed to be another part in the code that would kick out short positions, but either way aadding something like this would seem like a viable quick fix? |
I agree with @jacobvjk that in case we keep this kind of filter we should change it to the proposed format. Question is still whether we do this for |
Maybe a question for the pacta analysts? Maybe they know if we ever come across short bond positions? Though if we set the filter to >= 0, I don't see the harm in adding it? @FrederickFa |
I included cases in the reprex for short bond positions resulting in negative Therefore I would also agree / suggest filtering both |
In case this is the solution we are going for, I would also propose to only filter position above zero market value. Therefore only |
good point @FrederickFa totally agree |
Thanks folks! Also in agreement 100%. So next steps in my opinion...
|
should we bring it to the next Pacta Cop? (since the bi weekly was just two days ago and this seems to be P4I only anyways) |
also looping in @AlexAxthelm here in case they want to take the lead on guiding the discussion about this issue with the overall PACTA team on behalf of the PACTA tech team |
PACTA team, in my interpretation, gave the green light for this in the meantime, though it still may be a debate/question in the future. |
Thanks for taking the lead on this @cjyetman. Are you still looking for an "official" confirmation from the team, or are we good to go now? |
I believe it was "official" enough. |
Hi guys! I just checked this issue and I think it hasn't be resolved so far. This is a super heavy bug (as the label also says...) and in cases a portfolio has short positions it leads to totally wrong PACTA results. However, it is super straight forward to resolve (as described above). Can we bring this forward? Best |
will also post it here, more is more in this case.. @AlexAxthelm https://dev.azure.com/2DegreesInvesting/2DegreesInvesting/_workitems/edit/661 |
After running PACTA with the current code I found that some results on portfolio level showed negative values in
plan_alloc_wt_tech_prod
&plan_emission_factor
. As I am using port_weight, this can only happen (in theory) if the underlying ALD has negative production values (rather unrealistic but you never know) or that we are including short positions (negative values formarket_value
/value_usd
) in the analysis. I think the latter is the case.This would be a bug in my opinion, as we dont want to include short positions as this would distort the analysis.
Here is a reprex comparing results from two projects, one of which used an older version (from early autumn last year) of the code and one the current version
When comparing the two versions of the code (I still have a copy of it) I think I found the commit since when we are analysing short positions: 7e125aa
More specific, this line was deleted in
3_run_analysis.R
:port_eq <- port_eq %>% filter(port_weight > 1e-6)
I dont know the motivation why we had this filter in the first place, but it lead to the fact that we kicked out short positions from
port_eq
, as negative values are below1e-6
. Without this filter we include short positions since this commit.This raises a couple of questions from my end:
port_eq
and not also inport_cb
? It is possible to have negative bonds as well.The text was updated successfully, but these errors were encountered: