Hello guys,

recently I´m doing some research on the risk behavior of banks during the low interest rate enviroment. During this research I want to use the Difference-in-Differences (DiD) framework to check the impact of some polices on the risk behavior.
Now, I´m at the point where I want to check if the parallel trend assumption is fullfilled. So basically I want to show two graphs (which hopefully are parallel), but right now I´m not getting the results which I want.

I already tried to use the search function and found the following existing thread: https://www.statalist.org/forums/for...nce-estimation
But unfortunately the codes provided by Clyde don´t work for my data.

I tried to attach the data using dataex. I created a time variable (time) that is 0 before the treatment and jumps to 1 in the treatment year and afterwards (in my case the year 2014). I also created a dummy variable for treatment which I called treated. Which is 0 for all non-participating states and 1 for all participating states. Furthermore, I created a interaction variable (time*treated) called did. My dependent variable is called var1.

I hope you guys can understand my issue, thanks in advance for your help.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str139 Entity long ID int Year str3 Country float(var1 treated time did)
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2009 "AUT"         . 1 0 0
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2010 "AUT" 3.6468074 1 0 0
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2011 "AUT"  3.232498 1 0 0
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2012 "AUT"  3.584065 1 0 0
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2013 "AUT"   3.69737 1 0 0
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2014 "AUT"  4.380235 1 1 1
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2015 "AUT"  4.351543 1 1 1
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2016 "AUT" 4.3284616 1 1 1
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2017 "AUT"  6.243345 1 1 1
"Oesterreichische Kontrollbank Aktiengesellschaft (OeKB)"                   108773 2018 "AUT"  4.634541 1 1 1
"Erste Group Bank AG"                                                       111522 2009 "AUT"         . 1 0 0
"Erste Group Bank AG"                                                       111522 2010 "AUT"  4.817286 1 0 0
"Erste Group Bank AG"                                                       111522 2011 "AUT"  2.582155 1 0 0
"Erste Group Bank AG"                                                       111522 2012 "AUT"  2.806624 1 0 0
"Erste Group Bank AG"                                                       111522 2013 "AUT"  3.265511 1 0 0
"Erste Group Bank AG"                                                       111522 2014 "AUT"  2.537356 1 1 1
"Erste Group Bank AG"                                                       111522 2015 "AUT" 2.5322356 1 1 1
"Erste Group Bank AG"                                                       111522 2016 "AUT"  2.402875 1 1 1
"Erste Group Bank AG"                                                       111522 2017 "AUT"  4.911036 1 1 1
"Erste Group Bank AG"                                                       111522 2018 "AUT" 4.4744043 1 1 1
"UniCredit Bank Austria AG"                                                 111593 2009 "AUT"         . 1 0 0
"UniCredit Bank Austria AG"                                                 111593 2010 "AUT" 4.3114676 1 0 0
"UniCredit Bank Austria AG"                                                 111593 2011 "AUT"  3.650456 1 0 0
"UniCredit Bank Austria AG"                                                 111593 2012 "AUT" 4.1277785 1 0 0
"UniCredit Bank Austria AG"                                                 111593 2013 "AUT"  2.479307 1 0 0
"UniCredit Bank Austria AG"                                                 111593 2014 "AUT" 2.3276858 1 1 1
"UniCredit Bank Austria AG"                                                 111593 2015 "AUT" 2.2306044 1 1 1
"UniCredit Bank Austria AG"                                                 111593 2016 "AUT"    5.2688 1 1 1
"UniCredit Bank Austria AG"                                                 111593 2017 "AUT"  5.806949 1 1 1
"UniCredit Bank Austria AG"                                                 111593 2018 "AUT"  6.296226 1 1 1
"KA Finanz AG"                                                              113903 2009 "AUT"         . 1 0 0
"KA Finanz AG"                                                              113903 2010 "AUT" -.7619715 1 0 0
"KA Finanz AG"                                                              113903 2011 "AUT"         . 1 0 0
"KA Finanz AG"                                                              113903 2012 "AUT"  .4622768 1 0 0
"KA Finanz AG"                                                              113903 2013 "AUT"  .9465511 1 0 0
"KA Finanz AG"                                                              113903 2014 "AUT"  2.700531 1 1 1
"KA Finanz AG"                                                              113903 2015 "AUT"  3.284737 1 1 1
"KA Finanz AG"                                                              113903 2016 "AUT" 3.3296614 1 1 1
"KA Finanz AG"                                                              113903 2017 "AUT"         . 1 1 1
"KA Finanz AG"                                                              113903 2018 "AUT"         . 1 1 1
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2009 "AUT"         . 1 0 0
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2010 "AUT"  4.086985 1 0 0
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2011 "AUT" 3.7687495 1 0 0
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2012 "AUT"  3.589743 1 0 0
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2013 "AUT"   3.69524 1 0 0
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2014 "AUT"  3.598479 1 1 1
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2015 "AUT" 3.7505076 1 1 1
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2016 "AUT"  3.047499 1 1 1
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2017 "AUT" 3.0885265 1 1 1
"Erste Bank der Oesterreichischen Sparkassen AG"                            143583 2018 "AUT"  3.766962 1 1 1
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2009 "AUT"         . 1 0 0
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2010 "AUT"  4.319907 1 0 0
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2011 "AUT" 4.5605206 1 0 0
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2012 "AUT" 4.6250615 1 0 0
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2013 "AUT" 4.5886517 1 0 0
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2014 "AUT"  4.012818 1 1 1
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2015 "AUT" 3.7343426 1 1 1
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2016 "AUT"  3.556873 1 1 1
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2017 "AUT"  3.633724 1 1 1
"Allgemeine Sparkasse Oberoesterreich Bank AG (Sparkasse Oberoesterreich)" 1000300 2018 "AUT"  3.585174 1 1 1
"Alpenbank AG"                                                             1000318 2009 "AUT"         . 1 0 0
"Alpenbank AG"                                                             1000318 2010 "AUT"  3.455736 1 0 0
"Alpenbank AG"                                                             1000318 2011 "AUT"  3.391225 1 0 0
"Alpenbank AG"                                                             1000318 2012 "AUT" 3.3082175 1 0 0
"Alpenbank AG"                                                             1000318 2013 "AUT" 3.8080075 1 0 0
"Alpenbank AG"                                                             1000318 2014 "AUT"  3.390154 1 1 1
"Alpenbank AG"                                                             1000318 2015 "AUT"  3.940102 1 1 1
"Alpenbank AG"                                                             1000318 2016 "AUT"  2.356958 1 1 1
"Alpenbank AG"                                                             1000318 2017 "AUT"  2.499289 1 1 1
"Alpenbank AG"                                                             1000318 2018 "AUT" 2.3077037 1 1 1
"Sparkasse der Stadt Amstetten AG"                                         1000430 2009 "AUT"         . 1 0 0
"Sparkasse der Stadt Amstetten AG"                                         1000430 2010 "AUT"   5.61099 1 0 0
"Sparkasse der Stadt Amstetten AG"                                         1000430 2011 "AUT" 2.2365744 1 0 0
"Sparkasse der Stadt Amstetten AG"                                         1000430 2012 "AUT"   2.46491 1 0 0
"Sparkasse der Stadt Amstetten AG"                                         1000430 2013 "AUT"  2.577552 1 0 0
"Sparkasse der Stadt Amstetten AG"                                         1000430 2014 "AUT"  5.552824 1 1 1
"Sparkasse der Stadt Amstetten AG"                                         1000430 2015 "AUT"   3.74209 1 1 1
"Sparkasse der Stadt Amstetten AG"                                         1000430 2016 "AUT"  3.530195 1 1 1
"Sparkasse der Stadt Amstetten AG"                                         1000430 2017 "AUT"  3.477993 1 1 1
"Sparkasse der Stadt Amstetten AG"                                         1000430 2018 "AUT"  6.613332 1 1 1
"Autobank Aktiengesellschaft"                                              1000858 2009 "AUT"         . 1 0 0
"Autobank Aktiengesellschaft"                                              1000858 2010 "AUT"   2.85176 1 0 0
"Autobank Aktiengesellschaft"                                              1000858 2011 "AUT"  2.952066 1 0 0
"Autobank Aktiengesellschaft"                                              1000858 2012 "AUT"  4.173156 1 0 0
"Autobank Aktiengesellschaft"                                              1000858 2013 "AUT"  3.121496 1 0 0
"Autobank Aktiengesellschaft"                                              1000858 2014 "AUT" 3.4457746 1 1 1
"Autobank Aktiengesellschaft"                                              1000858 2015 "AUT"  3.524288 1 1 1
"Autobank Aktiengesellschaft"                                              1000858 2016 "AUT"  6.046474 1 1 1
"Autobank Aktiengesellschaft"                                              1000858 2017 "AUT"  5.178563 1 1 1
"Autobank Aktiengesellschaft"                                              1000858 2018 "AUT"  3.372565 1 1 1
"Bankhaus Schelhammer & Schattera"                                         1001149 2009 "AUT"         . 1 0 0
"Bankhaus Schelhammer & Schattera"                                         1001149 2010 "AUT"  8.170717 1 0 0
"Bankhaus Schelhammer & Schattera"                                         1001149 2011 "AUT" 4.1801376 1 0 0
"Bankhaus Schelhammer & Schattera"                                         1001149 2012 "AUT" 4.3552737 1 0 0
"Bankhaus Schelhammer & Schattera"                                         1001149 2013 "AUT" 4.4851685 1 0 0
"Bankhaus Schelhammer & Schattera"                                         1001149 2014 "AUT"  5.913783 1 1 1
"Bankhaus Schelhammer & Schattera"                                         1001149 2015 "AUT"  5.164248 1 1 1
"Bankhaus Schelhammer & Schattera"                                         1001149 2016 "AUT"  4.607351 1 1 1
"Bankhaus Schelhammer & Schattera"                                         1001149 2017 "AUT"  4.508744 1 1 1
"Bankhaus Schelhammer & Schattera"                                         1001149 2018 "AUT" 4.6733255 1 1 1
end