I am looking for some help on my matching procedure. I am writing a paper in which I compare sustainable funds to their conventional counterparts. I aim to match every of the around 400 sustainable funds to 3 conventional ones. They should have the same investment objective (ObjectiveCode), age should not deviate more than 1 year and the TNA (or logTNA) should be as close as possible. I aim to match based on their first appearance in the dataset to control for funds being active in the same year.

I currently have this code:

Code:
gen first = 0
bysort FundIdentifier (Date): replace first = 1 if _n == 1
drop if first == 0

ssc install vmatch
gen logTNA = log(TNA)
vmatch SRI, g(M1) d(age 1) re(logTNA 1) s(rObjectiveCode) f
Though this does not seem return a match for every fund that that SRI (sustainability dummy) set to 1 and for some funds I find a large amount of potential matches. Do any of you have any idea how to improve this code or should I use another matching technique from SSC?

Thanks in advance.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long FundIdentifier int Date double TNA float logTNA int age byte SRI str3 ObjectiveCode float first
 105 14973   69.6  4.2427645 35 0 "GL"  1
 197 14973    1.7  .53062826 25 0 "IID" 1
 243 14973   13.8  2.6246686 26 0 "IID" 1
 437 14973    7.6  2.0281482 22 0 "GX"  1
 439 14973    7.5   2.014903 22 0 "GX"  1
 440 15340     .4  -.9162908 20 0 "G"   1
 442 14973    2.1   .7419373 22 0 "GX"  1
 479 14973   17.2  2.8449094 25 0 "MC"  1
 507 14973    4.4  1.4816046 22 0 "GX"  1
 519 14973     .1 -2.3025851 23 0 "B"   1
 522 14973     .1 -2.3025851 21 0 "GX"  1
1942 14973    4.3   1.458615 25 0 "G"   1
2413 14973  437.7   6.081534 44 0 "G"   1
2631 14973   17.4    2.85647 24 0 "HY"  1
2696 14973    1.4   .3364722 30 0 "TM"  1
2697 15340    1.7  .53062826 20 0 "SG"  1
2698 15340    2.2   .7884573 20 0 "MC"  1
2699 15340    2.3   .8329091 20 0 "SP"  1
2700 17531   14.1   2.646175 15 0 "I"   1
2701 17531     41   3.713572 15 0 "B"   1
2702 17531   27.1   3.299534 15 0 "GI"  1
2703 17531    3.4  1.2237754 14 0 "IID" 1
2704 18627  262.9   5.571774 19 0 "I"   1
2706 18627 1122.3   7.023136 19 0 "B"   1
2708 18627  842.7   6.736611 19 0 "GI"  1
2711 18627  347.5   5.850765 17 0 "B"   1
2724 18627  746.5   6.615396 19 0 "GL"  1
2725 18627 1029.9   6.937217 19 0 "IF"  1
2727 18627  399.9   5.991215 19 1 "SG"  1
2729 18627 1044.4   6.951198 19 1 "G"   1
2731 18627  986.9   6.894569 19 1 "G"   1
2733 18627  335.9   5.816813 19 1 "SP"  1
2736 18627  337.9    5.82275 19 0 "A"   1
2738 18627  709.9   6.565124 19 0 "IID" 1
2739 15705     21  3.0445225 19 0 "SII" 1
2741 18627  580.7   6.364234 19 0 "SID" 1
2743 18627 1167.8   7.062877 19 0 "IMM" 1
2744 14973    185   5.220356 28 0 "IID" 1
2745 17164  266.9   5.586874 15 0 "SG"  1
2746 17164   20.7   3.030134 15 0 "EI"  1
2747 17164   82.8   4.416428 16 0 "SG"  1
2748 16436     37   3.610918 16 0 "MC"  1
2749 16070   10.5  2.3513753 17 0 "HY"  1
2750 16070   11.1   2.406945 17 0 "HY"  1
2751 16070     .7  -.3566749 17 0 "IID" 1
2752 16436    6.3  1.8405496 17 0 "EM"  1
2753 14973     .2  -1.609438 28 0 "IID" 1
2754 15340      6  1.7917595 20 0 "SG"  1
2755 15340    8.5  2.1400661 20 0 "G"   1
2756 15340    3.8   1.335001 20 0 "TK"  1
2757 15705   50.9   3.929863 19 0 "SG"  1
2758 14973  220.8   5.397257 22 0 "SG"  1
2759 14973  180.3   5.194622 22 0 "B"   1
2760 14973  163.3   5.095589 26 0 "B"   1
2761 14973 1319.1   7.184705 25 0 "G"   1
2762 14973 1299.2   7.169504 26 0 "G"   1
2763 14973   30.3  3.4111476 26 0 "MC"  1
2764 14973  115.1  4.7458014 27 0 "IID" 1
2765 15340     78   4.356709 20 0 "IID" 1
2766 14973  404.8   6.003393 27 0 "MM"  1
2767 14973   20.5   3.020425 27 0 "IMD" 1
2768 14973  311.8   5.742362 25 0 "B"   1
2769 14973  512.5   6.239301 27 0 "GI"  1
2770 15340   53.6   3.981549 20 0 "GI"  1
2771 16070     .3 -1.2039728 18 0 "G"   1
2772 16070     .1 -2.3025851 18 0 "GI"  1
2773 16070     .2  -1.609438 18 0 "GI"  1
2774 14973   95.2  4.5559797 25 0 "IID" 1
2775 14973   42.6   3.751854 22 0 "SG"  1
2776 14973  306.6   5.725544 25 0 "GI"  1
2777 15705    2.1   .7419373 19 0 "G"   1
2778 14973     27   3.295837 28 0 "GM"  1
2779 15340     92  4.5217886 20 0 "IMM" 1
2780 15340 1486.9   7.304449 21 0 "IMM" 1
2781 14973   63.2   4.146304 28 0 "TEM" 1
2782 14973  416.8   6.032607 28 0 "TEM" 1
2783 14973     .3 -1.2039728 28 0 "GM"  1
2784 14973     .1 -2.3025851 22 0 "RE"  1
2785 14973   21.7   3.077312 23 0 "RE"  1
2786 14973   21.1   3.049273 25 0 "LT"  1
2787 14973  230.5   5.440251 28 0 "MM"  1
2788 14973   44.1    3.78646 28 0 "MM"  1
2789 14973   75.7   4.326778 27 0 "USS" 1
2790 14973  588.3   6.377237 28 0 "USS" 1
2791 14973   13.4   2.595255 28 0 "UST" 1
2792 14973  219.4   5.390896 28 0 "UST" 1
2793 14973   18.4   2.912351 27 0 "XJ"  1
2794 14973    2.8  1.0296195 28 0 "IF"  1
2795 14973  132.5   4.886583 28 0 "IF"  1
2796 14973     .6 -.51082563 28 0 "SG"  1
2797 14973   73.6   4.298645 28 0 "SG"  1
2798 14973      3  1.0986123 28 0 "G"   1
2799 14973  228.4   5.431098 28 0 "G"   1
2800 14973    2.3   .8329091 28 0 "GI"  1
2801 14973  131.6   4.879767 28 0 "GI"  1
2802 14973    2.4   .8754687 28 0 "FX"  1
2803 14973   71.9   4.275276 28 0 "FX"  1
2804 17164   47.4   3.858622 15 0 "RE"  1
2805 17164  258.2   5.553734 15 0 "GI"  1
2806 17164    1.2  .18232156 15 0 "MC"  1
end
format %td Date