Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
Libraries:
Datasets
License:
Oyiyi commited on
Commit
51d901a
·
verified ·
1 Parent(s): b1a650c

Upload 15 files

Browse files
data_collect/combined_economic_data_2015_2025.csv ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Date,GDP_Value,CPI,UNRATE,SOFR,FEDFUNDS,Baa_Yield,Tsy2Y,Tsy5Y,Tsy10Y,Tsy30Y,VIX,PE_Ratio,PS_Ratio,Gross_Margin,EBITDA_Margin,Monthly_User_Growth,Annual_User_Growth,adj_Monthly_User_Growth,adj_Annual_User_Growth
2
+ 2015-01-31,18063.529,234.747,5.7,,0.11,1.501,0.5515,1.3745,1.8815,2.455,19.1195,20.02,2.2022,47.42,21.31,0.89,11.18,0.89,11.22
3
+ 2015-02-28,18135.614,235.342,5.5,,0.11,1.4252,0.6189,1.4726,1.9753,2.5663,15.9042,20.77,2.2847,47.42,21.31,0.89,11.18,0.89,11.22
4
+ 2015-03-31,18207.699,235.976,5.4,,0.11,1.3468,0.6405,1.5191,2.0427,2.6264,14.8127,20.96,2.3056,47.42,21.31,0.89,11.18,0.89,11.22
5
+ 2015-04-30,18279.784,236.222,5.4,,0.12,1.331,0.54,1.3545,1.935,2.5859,13.4948,21.42,2.3562,47.42,21.31,0.89,11.18,0.89,11.22
6
+ 2015-05-31,18320.398,237.001,5.6,,0.12,1.3371,0.609,1.5385,2.1975,2.955,13.3385,21.92,2.4112,47.42,21.31,0.89,11.18,0.89,11.22
7
+ 2015-06-30,18361.012,237.657,5.3,,0.13,1.4159,0.6886,1.6836,2.3636,3.1118,14.3395,22.12,2.4332,47.42,21.31,0.89,11.18,0.89,11.22
8
+ 2015-07-31,18401.626,238.034,5.2,,0.13,1.5091,0.6677,1.6323,2.3245,3.0664,14.3527,22.4,2.464,47.42,21.31,0.89,11.18,0.89,11.22
9
+ 2015-08-31,18412.7963,238.033,5.1,,0.14,1.6486,0.6976,1.5414,2.1671,2.8557,19.4281,22.15,2.4365,47.42,21.31,0.88,11.09,0.88,11.09
10
+ 2015-09-30,18423.9667,237.498,5.0,,0.14,1.6873,0.7133,1.49,2.1729,2.9529,24.3771,21.45,2.3595,47.42,21.31,0.88,10.99,0.88,11.09
11
+ 2015-10-31,18435.137,237.733,5.0,,0.12,1.7152,0.6448,1.3857,2.07,2.8881,16.7895,22.68,2.4948,47.42,21.31,0.87,10.9,0.87,10.95
12
+ 2015-11-30,18465.4023,238.017,5.1,,0.12,1.6243,0.8847,1.6711,2.2632,3.03,16.21,23.67,2.6037,47.42,21.31,0.86,10.81,0.86,10.82
13
+ 2015-12-31,18495.6677,237.761,5.0,,0.24,1.6991,0.9827,1.6986,2.2427,2.97,18.0255,23.74,2.6114,47.42,21.31,0.85,10.71,0.85,10.69
14
+ 2016-01-31,18525.933,237.652,4.8,,0.34,1.8843,0.8995,1.5184,2.0853,2.8584,23.7179,22.18,2.4398,47.42,21.31,0.85,10.62,0.85,10.69
15
+ 2016-02-29,18587.856,237.336,4.9,,0.38,2.1324,0.7335,1.222,1.7795,2.623,22.517,22.02,2.4222,47.42,21.31,0.84,10.53,0.84,10.56
16
+ 2016-03-31,18649.779,238.08,5.0,,0.36,1.8264,0.875,1.3759,1.8891,2.6845,15.8491,23.39,2.5729,47.42,21.31,0.83,10.43,0.83,10.43
17
+ 2016-04-30,18711.702,238.992,5.1,,0.37,1.6159,0.7681,1.2581,1.8052,2.6233,14.3005,23.97,2.6367,47.42,21.31,0.82,10.34,0.82,10.3
18
+ 2016-05-31,18772.0143,239.557,4.8,,0.37,1.5514,0.8162,1.3005,1.8062,2.6276,14.8529,23.81,2.6191,47.42,21.31,0.82,10.25,0.82,10.3
19
+ 2016-06-30,18832.3267,240.222,4.9,,0.38,1.5777,0.7314,1.1664,1.6441,2.4523,17.7745,23.97,2.6367,47.42,21.31,0.81,10.15,0.81,10.16
20
+ 2016-07-31,18892.639,240.101,4.8,,0.39,1.5214,0.6725,1.0715,1.504,2.227,13.1585,24.52,2.6972,47.42,21.31,0.8,10.06,0.8,10.03
21
+ 2016-08-31,18958.219,240.545,4.9,,0.4,1.437,0.7374,1.133,1.5565,2.2617,12.3996,24.57,2.7027,47.54,21.4,0.83,10.49,0.83,10.43
22
+ 2016-09-30,19023.799,241.176,5.0,,0.4,1.4145,0.771,1.1781,1.6305,2.3505,14.2195,24.22,2.6642,47.66,21.49,0.86,10.92,0.86,10.82
23
+ 2016-10-31,19089.379,241.741,4.9,,0.4,1.3714,0.843,1.272,1.7645,2.5005,14.5852,23.57,2.5927,47.78,21.58,0.9,11.35,0.9,11.35
24
+ 2016-11-30,19152.9473,242.026,4.7,,0.41,1.3705,0.9795,1.596,2.142,2.862,15.2362,23.35,2.5685,47.9,21.67,0.93,11.78,0.93,11.75
25
+ 2016-12-31,19216.5157,242.637,4.7,,0.54,1.3095,1.1967,1.959,2.4919,3.1133,12.4724,23.76,2.6136,48.02,21.76,0.96,12.21,1.5,19.56
26
+ 2017-01-31,19280.084,243.618,4.7,,0.65,1.279,1.2065,1.9165,2.4325,3.019,11.6085,23.59,2.5949,48.14,21.85,1.0,12.65,2.0,26.82
27
+ 2017-02-28,19332.937,244.006,4.6,,0.66,1.251,1.2011,1.9016,2.4189,3.0321,11.5305,23.68,2.6048,48.27,21.94,1.03,13.08,3.0,42.58
28
+ 2017-03-31,19385.79,243.892,4.4,,0.79,1.2126,1.313,2.0135,2.4817,3.0813,11.8978,23.6,2.596,48.39,22.03,1.06,13.51,5.0,79.59
29
+ 2017-04-30,19438.643,244.193,4.4,,0.9,1.238,1.2411,1.8242,2.2974,2.9416,13.1363,23.24,2.5564,48.51,22.12,1.09,13.94,7.0,125.22
30
+ 2017-05-31,19523.2937,244.004,4.4,,0.91,1.1891,1.3018,1.8368,2.3036,2.9591,10.8623,23.31,2.5641,48.63,22.21,1.12,14.37,9.0,181.27
31
+ 2017-06-30,19607.9443,244.163,4.3,,1.04,1.1768,1.3423,1.7741,2.1868,2.7964,10.5136,23.4,2.574,48.75,22.3,1.16,14.8,10.0,213.84
32
+ 2017-07-31,19692.595,244.243,4.3,,1.15,1.1071,1.3725,1.872,2.318,2.884,10.2645,23.36,2.5696,48.87,22.39,1.19,15.23,10.0,213.84
33
+ 2017-08-31,19807.426,245.183,4.4,,1.16,1.1313,1.3352,1.7765,2.2091,2.7952,11.9757,23.16,2.5476,48.68,22.13,1.2,15.43,9.0,181.27
34
+ 2017-09-30,19922.257,246.435,4.3,,1.15,1.1282,1.3845,1.7975,2.202,2.7765,10.438,23.28,2.5608,48.48,21.86,1.22,15.63,7.0,125.22
35
+ 2017-10-31,20037.088,246.626,4.2,,1.15,1.0236,1.5495,1.981,2.36,2.8781,10.1255,23.67,2.6037,48.28,21.6,1.23,15.83,5.0,79.59
36
+ 2017-11-30,20134.243,247.284,4.2,,1.16,1.0445,1.6967,2.05,2.3533,2.8019,10.5405,23.81,2.6191,48.09,21.33,1.25,16.03,3.0,42.58
37
+ 2017-12-31,20231.398,247.805,4.1,,1.3,1.0033,1.844,2.182,2.4025,2.768,10.2645,24.25,2.6675,47.9,21.07,1.26,16.23,2.0,26.82
38
+ 2018-01-31,20328.553,248.859,4.0,,1.41,0.9468,2.0319,2.3819,2.5838,2.8776,11.0624,24.97,2.7467,47.7,20.8,1.28,16.42,1.5,19.56
39
+ 2018-02-28,20412.6727,249.529,4.1,,1.42,0.966,2.1753,2.5995,2.8589,3.1311,22.4647,23.82,2.6202,47.5,20.54,1.29,16.62,1.29,16.63
40
+ 2018-03-31,20496.7923,249.577,4.0,,1.51,1.1,2.2757,2.6295,2.8424,3.0914,19.0238,23.41,2.5751,47.31,20.28,1.3,16.82,1.3,16.77
41
+ 2018-04-30,20580.912,250.227,4.0,1.742,1.69,1.1248,2.3843,2.7019,2.869,3.0719,18.2676,22.53,2.4783,47.12,20.01,1.32,17.02,1.32,17.04
42
+ 2018-05-31,20653.518,250.792,3.8,1.7305,1.7,1.1596,2.5118,2.8168,2.9777,3.1318,14.1245,22.49,2.4739,46.92,19.75,1.33,17.22,1.33,17.18
43
+ 2018-06-30,20726.124,251.018,4.0,1.8367,1.82,1.2423,2.5333,2.7757,2.9124,3.05,13.6781,22.49,2.4739,46.72,19.48,1.35,17.42,1.35,17.46
44
+ 2018-07-31,20798.73,251.214,3.8,1.9138,1.91,1.2327,2.6067,2.7776,2.889,3.0067,13.1476,22.33,2.4563,46.53,19.22,1.36,17.62,1.36,17.6
45
+ 2018-08-31,20838.4423,251.663,3.8,1.9174,1.91,1.1778,2.6357,2.7678,2.8891,3.0417,12.547,22.37,2.4607,46.4,19.32,1.34,17.34,1.34,17.32
46
+ 2018-09-30,20878.1547,252.182,3.7,1.9684,1.95,1.1605,2.7679,2.8937,3.0042,3.1511,12.9105,22.25,2.4475,46.26,19.42,1.32,17.06,1.32,17.04
47
+ 2018-10-31,20917.867,252.772,3.8,2.1841,2.19,1.1691,2.8609,3.0005,3.1523,3.3395,19.3522,21.25,2.3375,46.13,19.52,1.3,16.77,1.3,16.77
48
+ 2018-11-30,20982.4447,252.594,3.8,2.2205,2.2,1.3205,2.859,2.947,3.117,3.361,19.389,20.67,2.2737,46.0,19.62,1.28,16.49,1.28,16.49
49
+ 2018-12-31,21047.0223,252.767,3.9,2.3505,2.27,1.512,2.6763,2.6816,2.8326,3.0958,24.9532,19.39,2.1329,45.87,19.72,1.26,16.21,1.26,16.21
50
+ 2019-01-31,21111.6,252.561,4.0,2.4724,2.4,1.4995,2.5433,2.5362,2.7138,3.0352,19.5724,19.6,2.156,45.74,19.82,1.24,15.92,1.24,15.94
51
+ 2019-02-28,21207.046,253.319,3.8,2.4042,2.4,1.324,2.5042,2.4879,2.6763,3.0237,15.2347,20.6,2.266,45.6,19.93,1.22,15.64,1.22,15.66
52
+ 2019-03-31,21302.492,254.277,3.8,2.4171,2.41,1.2659,2.4095,2.3729,2.571,2.9776,14.4852,20.86,2.2946,45.47,20.03,1.2,15.36,1.2,15.39
53
+ 2019-04-30,21397.938,255.233,3.7,2.4762,2.42,1.1943,2.3448,2.3333,2.5324,2.9405,12.949,21.56,2.3716,45.34,20.13,1.18,15.08,1.18,15.12
54
+ 2019-05-31,21504.349,255.296,3.6,2.4205,2.39,1.2417,2.2064,2.1877,2.395,2.8177,16.7218,21.15,2.3265,45.2,20.23,1.16,14.8,1.16,14.84
55
+ 2019-06-30,21610.76,255.213,3.6,2.393,2.38,1.2929,1.814,1.825,2.074,2.5745,15.836,21.37,2.3507,45.07,20.33,1.14,14.51,1.5,19.56
56
+ 2019-07-31,21717.171,255.802,3.7,2.4495,2.4,1.1765,1.835,1.8282,2.0591,2.5727,13.3059,22.28,2.4508,44.94,20.43,1.12,14.23,1.8,23.87
57
+ 2019-08-31,21789.1863,256.036,3.6,2.1282,2.13,1.2583,1.5714,1.4868,1.6264,2.1191,18.9791,21.67,2.3837,45.08,20.47,1.18,15.01,2.0,26.82
58
+ 2019-09-30,21861.2017,256.43,3.5,2.2715,2.04,1.2243,1.648,1.565,1.6995,2.158,15.559,22.44,2.4684,45.22,20.5,1.23,15.79,3.0,42.58
59
+ 2019-10-31,21933.217,257.155,3.6,1.8641,1.83,1.1991,1.5514,1.525,1.7068,2.1905,15.4665,22.04,2.4244,45.36,20.54,1.28,16.58,4.0,60.1
60
+ 2019-11-30,21872.5573,257.879,3.6,1.5726,1.55,1.1233,1.6126,1.6395,1.8121,2.2805,12.5235,22.62,2.4882,45.5,20.58,1.34,17.36,5.0,79.59
61
+ 2019-12-31,21811.8977,258.63,3.6,1.5462,1.55,1.0476,1.6133,1.6824,1.8629,2.2976,13.7567,22.78,2.5058,45.64,20.61,1.4,18.14,5.0,79.59
62
+ 2020-01-31,21751.238,259.127,3.6,1.5481,1.55,1.0214,1.519,1.5624,1.7576,2.2162,13.941,24.88,2.7368,45.78,20.65,1.45,18.92,4.0,60.1
63
+ 2020-02-29,21153.589,259.25,3.5,1.5858,1.58,1.0833,1.3311,1.3237,1.5042,1.9705,19.6289,26.42,2.9062,45.92,20.69,1.5,19.7,3.0,42.58
64
+ 2020-03-31,20555.94,258.076,4.4,0.6095,0.65,2.5841,0.4482,0.5918,0.87,1.455,57.7368,22.8,2.508,46.06,20.72,1.56,20.48,2.0,26.82
65
+ 2020-04-30,19958.291,256.032,14.8,0.0195,0.05,2.5481,0.2248,0.3881,0.6576,1.2652,41.4538,24.97,2.7467,46.2,20.76,1.62,21.26,1.62,21.27
66
+ 2020-05-31,20540.3397,255.802,13.2,0.0455,0.05,2.0795,0.1705,0.3395,0.674,1.378,30.897,27.82,3.0602,46.34,20.8,1.67,22.05,1.67,21.99
67
+ 2020-06-30,21122.3883,257.042,11.0,0.0791,0.08,1.6377,0.185,0.3445,0.7286,1.4936,31.1195,31.29,3.4419,46.48,20.83,1.72,22.83,1.72,22.71
68
+ 2020-07-31,21704.437,258.352,10.2,0.1055,0.09,1.4639,0.1482,0.2786,0.6236,1.3105,26.8405,32.44,3.5684,46.62,20.87,1.78,23.61,1.78,23.58
69
+ 2020-08-31,21832.0113,259.316,8.4,0.0857,0.1,1.3643,0.1395,0.2667,0.65,1.3581,22.8895,34.41,3.7851,46.65,20.97,1.72,22.73,1.72,22.71
70
+ 2020-09-30,21959.5857,259.997,7.8,0.0857,0.09,1.3791,0.1348,0.2695,0.6795,1.4229,27.6476,34.27,3.7697,46.68,21.07,1.65,21.84,1.65,21.7
71
+ 2020-10-31,22087.16,260.319,6.9,0.0871,0.09,1.3417,0.1495,0.3357,0.7871,1.5686,29.4386,35.3,3.883,46.71,21.17,1.59,20.96,1.59,20.84
72
+ 2020-11-30,22285.0043,260.911,6.7,0.0863,0.09,1.1981,0.1658,0.3879,0.87,1.6153,24.9955,37.16,4.0876,46.74,21.27,1.53,20.07,1.53,19.99
73
+ 2020-12-31,22482.8487,262.045,6.7,0.0823,0.09,1.0745,0.1359,0.3859,0.9336,1.6705,22.3741,39.26,4.3186,46.77,21.37,1.46,19.19,1.46,19.0
74
+ 2021-01-31,22680.693,262.639,6.4,0.0711,0.09,1.0148,0.1311,0.4453,1.0811,1.8247,24.91,35.96,3.9556,46.8,21.47,1.4,18.3,1.4,18.16
75
+ 2021-02-28,22929.0987,263.573,6.2,0.0416,0.08,0.9719,0.1153,0.5426,1.2579,2.0426,23.1405,33.24,3.6564,46.84,21.57,1.34,17.42,1.34,17.32
76
+ 2021-03-31,23177.5043,264.847,6.1,0.0152,0.07,1.0017,0.147,0.823,1.6109,2.3391,21.843,30.5,3.355,46.87,21.67,1.27,16.54,1.27,16.35
77
+ 2021-04-30,23425.91,266.625,6.1,0.01,0.07,0.9457,0.1632,0.8618,1.635,2.2995,17.4162,29.92,3.2912,46.9,21.77,1.21,15.65,1.21,15.53
78
+ 2021-05-31,23611.3997,268.404,5.8,0.01,0.06,0.92,0.155,0.8195,1.621,2.316,19.7605,28.05,3.0855,46.93,21.87,1.15,14.77,1.15,14.71
79
+ 2021-06-30,23796.8893,270.71,5.9,0.0282,0.08,0.8859,0.2027,0.8386,1.5191,2.1636,16.9568,26.7,2.937,46.96,21.97,1.08,13.88,1.08,13.76
80
+ 2021-07-31,23982.379,271.965,5.4,0.05,0.1,0.9043,0.2195,0.7643,1.3186,1.9429,17.6033,26.56,2.9216,46.99,22.07,1.02,13.0,1.02,12.95
81
+ 2021-08-31,24259.4527,272.752,5.1,0.05,0.09,0.9323,0.2173,0.7723,1.2832,1.9164,17.4727,26.23,2.8853,46.6,21.77,0.95,12.09,0.95,12.01
82
+ 2021-09-30,24536.5263,273.942,4.7,0.05,0.08,0.9009,0.241,0.8638,1.3748,1.9357,19.8248,25.35,2.7885,46.22,21.47,0.88,11.18,0.88,11.09
83
+ 2021-10-31,24813.6,276.528,4.5,0.0465,0.08,0.8941,0.3925,1.106,1.5825,2.0595,17.8714,24.39,2.6829,45.83,21.17,0.81,10.28,0.81,10.16
84
+ 2021-11-30,24959.1823,278.824,4.1,0.05,0.08,0.9345,0.508,1.2025,1.5595,1.9355,18.5005,24.52,2.6972,45.44,20.87,0.74,9.37,0.74,9.25
85
+ 2021-12-31,25104.7647,280.806,3.9,0.0495,0.08,1.0041,0.68,1.2295,1.465,1.8477,21.3545,23.63,2.5993,45.06,20.57,0.67,8.46,0.67,8.34
86
+ 2022-01-31,25250.347,282.542,4.0,0.048,0.08,0.9981,0.9805,1.5385,1.764,2.0995,23.181,23.11,2.5421,44.67,20.28,0.6,7.56,0.6,7.44
87
+ 2022-02-28,25453.9953,284.525,3.9,0.0495,0.08,1.155,1.4353,1.8116,1.9342,2.2463,25.7484,22.42,2.4662,44.28,19.98,0.52,6.65,0.52,6.42
88
+ 2022-03-31,25657.6437,287.467,3.7,0.1613,0.2,1.3726,1.9096,2.1091,2.1278,2.4065,26.9687,22.19,2.4409,43.9,19.68,0.45,5.74,0.45,5.54
89
+ 2022-04-30,25861.292,288.582,3.7,0.286,0.33,1.2781,2.538,2.7775,2.7475,2.812,24.3735,22.4,2.464,43.51,19.38,0.38,4.83,0.38,4.66
90
+ 2022-05-31,26019.6293,291.299,3.6,0.7162,0.77,1.4595,2.6167,2.8743,2.8981,3.0657,29.3136,20.81,2.2891,43.12,19.08,0.31,3.92,0.31,3.78
91
+ 2022-06-30,26177.9667,295.072,3.6,1.0967,1.21,1.4709,2.9981,3.19,3.1433,3.2457,28.2332,20.28,2.2308,42.74,18.78,0.24,3.02,0.24,2.92
92
+ 2022-07-31,26336.304,294.94,3.5,1.607,1.68,1.5732,3.036,2.9635,2.896,3.1025,24.9952,20.53,2.2583,42.35,18.48,0.17,2.11,0.17,2.06
93
+ 2022-08-31,26481.0407,295.162,3.6,2.2835,2.33,1.4509,3.25,3.0274,2.8978,3.1296,22.1696,22.03,2.4233,42.12,18.55,0.15,1.86,0.15,1.81
94
+ 2022-09-30,26625.7773,296.421,3.5,2.5114,2.56,1.5155,3.8567,3.6967,3.519,3.5581,27.3418,20.58,2.2638,41.89,18.61,0.13,1.6,0.13,1.57
95
+ 2022-10-31,26770.514,297.979,3.6,3.0365,3.08,1.6648,4.375,4.178,3.9835,4.04,30.0057,20.44,2.2484,41.66,18.68,0.11,1.35,0.11,1.33
96
+ 2022-11-30,26919.1577,298.708,3.6,3.722,3.78,1.5095,4.5035,4.0555,3.891,3.999,23.2991,22.07,2.4277,41.43,18.74,0.09,1.1,0.09,1.09
97
+ 2022-12-31,27067.8013,298.808,3.5,4.0657,4.1,1.3868,4.2886,3.7643,3.6162,3.659,21.7843,22.65,2.4915,41.2,18.8,0.07,0.85,0.07,0.84
98
+ 2023-01-31,27216.445,300.456,3.5,4.3045,4.33,1.3176,4.2075,3.643,3.5315,3.6645,20.169,22.82,2.5102,40.97,18.87,0.05,0.59,0.05,0.6
99
+ 2023-02-28,27320.9817,301.476,3.6,4.5379,4.57,1.242,4.5337,3.9421,3.7468,3.8021,20.1205,23.4,2.574,40.74,18.94,0.02,0.34,0.02,0.24
100
+ 2023-03-31,27425.5183,301.643,3.5,4.6357,4.65,1.4465,4.3026,3.8235,3.663,3.7709,21.6443,22.66,2.4926,40.51,19.0,0.0,0.09,0.0,0.0
101
+ 2023-04-30,27530.055,302.858,3.4,4.8063,4.83,1.4085,4.016,3.537,3.46,3.6845,17.8179,23.27,2.5597,40.28,19.07,-0.02,-0.16,-0.02,-0.24
102
+ 2023-05-31,27711.652,303.316,3.6,5.0227,5.06,1.4561,4.1318,3.5914,3.5736,3.8555,17.6361,23.15,2.5465,40.05,19.13,-0.04,-0.42,-0.04,-0.48
103
+ 2023-06-30,27893.249,304.099,3.6,5.0562,5.08,1.3668,4.6395,3.9495,3.7481,3.8676,14.0032,24.01,2.6411,39.82,19.2,-0.06,-0.67,-0.06,-0.72
104
+ 2023-07-31,28074.846,304.615,3.5,5.0945,5.12,1.2619,4.8285,4.1415,3.8995,3.959,13.9324,24.76,2.7236,39.59,19.26,-0.08,-0.92,-0.08,-0.96
105
+ 2023-08-31,28191.4713,306.138,3.7,5.3009,5.33,1.23,4.9017,4.3065,4.1678,4.28,15.8539,24.16,2.6576,39.67,19.23,-0.07,-0.78,-0.07,-0.84
106
+ 2023-09-30,28308.0967,307.374,3.7,5.306,5.33,1.2205,5.022,4.487,4.379,4.473,15.1733,23.93,2.6323,39.75,19.21,-0.06,-0.65,-0.06,-0.72
107
+ 2023-10-31,28424.722,307.653,3.9,5.3114,5.33,1.2932,5.0676,4.7724,4.7981,4.9467,18.8877,22.78,2.5058,39.83,19.18,-0.04,-0.52,-0.04,-0.48
108
+ 2023-11-30,28519.2017,308.087,3.7,5.319,5.33,1.2132,4.8824,4.4862,4.5029,4.66,14.0191,23.51,2.5861,39.91,19.15,-0.03,-0.38,0.3,3.66
109
+ 2023-12-31,28613.6813,308.735,3.8,5.3355,5.33,1.0729,4.457,4.0045,4.02,4.1445,12.7185,24.35,2.6785,39.99,19.13,-0.02,-0.24,0.6,7.44
110
+ 2024-01-31,28708.161,309.794,3.7,5.321,5.33,1.0273,4.3229,3.9838,4.0581,4.2581,13.3886,25.01,2.7511,40.07,19.1,-0.01,-0.11,1.0,12.68
111
+ 2024-02-29,28854.4553,311.022,3.9,5.309,5.33,0.9805,4.544,4.188,4.2075,4.377,13.9805,26.14,2.8754,40.14,19.07,0.0,0.03,2.0,26.82
112
+ 2024-03-31,29000.7497,312.107,3.9,5.313,5.33,0.9543,4.588,4.201,4.2085,4.36,13.7875,27.02,2.9722,40.22,19.05,0.01,0.16,3.0,42.58
113
+ 2024-04-30,29147.044,313.016,3.9,5.3168,5.33,0.92,4.8732,4.5568,4.5391,4.6591,16.1377,26.41,2.9051,40.3,19.02,0.02,0.3,4.0,60.1
114
+ 2024-05-31,29268.584,313.14,3.9,5.3145,5.33,0.8896,4.8564,4.4991,4.4823,4.62,13.0587,26.93,2.9623,40.38,18.99,0.04,0.43,4.0,60.1
115
+ 2024-06-30,29390.124,313.131,4.1,5.3253,5.33,0.9357,4.7368,4.3168,4.3053,4.4447,12.667,27.64,3.0404,40.46,18.97,0.05,0.57,3.0,42.58
116
+ 2024-07-31,29511.664,313.566,4.2,5.3432,5.33,0.9343,4.4959,4.1618,4.2486,4.4614,14.3739,28.08,3.0888,40.54,18.94,0.06,0.7,2.5,34.49
117
+ 2024-08-31,29616.17,314.131,4.2,5.3327,5.33,1.0048,3.9655,3.7123,3.8709,4.1536,19.3123,27.67,3.0437,40.62,19.1,0.06,0.68,2.0,26.82
118
+ 2024-09-30,29720.676,314.851,4.1,5.1455,5.13,0.961,3.6225,3.497,3.7235,4.0445,17.6633,28.09,3.0899,40.71,19.26,0.06,0.66,1.5,19.56
119
+ 2024-10-31,29825.182,315.564,4.1,4.8491,4.83,0.8552,3.9723,3.9105,4.0955,4.3755,19.9609,28.45,3.1295,40.8,19.42,0.06,0.64,1.0,12.68
120
+ 2024-11-30,29897.4923,316.449,4.2,4.6437,4.64,0.8068,4.2574,4.2284,4.3558,4.5368,16.0152,28.66,3.1526,40.88,19.58,0.05,0.62,0.05,0.6
121
+ 2024-12-31,29969.8027,317.603,4.1,4.5319,4.48,0.8035,4.2257,4.2514,4.3914,4.5805,15.8662,28.6,3.146,40.96,19.74,0.05,0.6,0.05,0.6
122
+ 2025-01-31,30042.113,319.086,4.0,4.3157,4.33,0.8227,4.2719,4.429,4.629,4.8538,16.7636,28.16,3.0976,41.05,19.9,0.05,0.58,0.05,0.6
123
+ 2025-02-28,,319.775,4.2,4.3437,4.33,0.823,4.21,4.2805,4.4511,4.6805,16.968,28.15,3.0965,41.14,20.05,0.05,0.56,0.05,0.6
124
+ 2025-03-31,,319.615,4.2,4.3267,4.33,0.9176,3.97,4.0433,4.2805,4.5981,21.8414,26.23,2.8853,41.22,20.21,0.05,0.54,0.05,0.6
125
+ 2025-04-30,,320.321,4.2,4.3486,4.33,1.1057,3.7776,3.9133,4.279,4.711,31.9662,24.56,2.7016,41.3,20.37,0.04,0.52,0.04,0.48
126
+ 2025-05-31,,320.58,4.3,4.3052,4.33,0.9609,3.92,4.0233,4.4238,4.9048,20.4623,26.34,2.8974,41.39,20.53,0.04,0.5,0.04,0.48
127
+ 2025-06-30,,321.5,4.1,4.3165,4.33,0.8805,3.889,3.963,4.3835,4.891,18.4033,27.1,2.981,41.48,20.69,0.04,0.48,0.04,0.48
128
+ 2025-07-31,,322.132,4.3,4.3368,4.33,0.8061,3.8823,3.9486,4.3918,4.9218,16.3813,27.81,3.0591,41.56,20.85,0.04,0.46,0.04,0.48
129
+ 2025-08-31,,323.364,4.3,4.3443,4.33,0.7864,3.7038,3.7862,4.2648,4.8686,15.75,27.84,3.0624,41.56,20.85,0.04,0.46,0.04,0.48
130
+ 2025-09-30,,324.368,4.4,4.2995,4.22,0.7718,3.5686,3.6624,4.1205,4.7429,15.7891,28.13,3.0943,41.56,20.85,0.04,0.46,0.04,0.48
131
+ 2025-10-31,,,,4.2009,4.09,0.7761,3.5214,3.6486,4.0618,4.6368,18.0865,,,41.56,20.85,0.04,0.46,0.04,0.48
132
+ 2025-11-30,,325.031,4.5,3.9778,3.88,0.8324,3.55,3.6733,4.0939,4.7017,19.7695,,,41.56,20.85,0.04,0.46,0.04,0.48
133
+ 2025-12-31,,326.03,4.4,3.8,3.72,0.7968,3.5009,3.7018,4.1432,4.8009,15.5482,,,41.56,20.85,0.04,0.46,0.04,0.48
data_collect/fundraising_success_probabilities_2015_2025.csv ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Date,Rate_Used,Rate_Source,VIX,P_debt,P_equity,adj_P_debt,adj_P_equity
2
+ 2015-01-31,0.11,FEDFUNDS,19.1195,0.9812,0.8111,0.9812,0.8111
3
+ 2015-02-28,0.11,FEDFUNDS,15.9042,0.9812,0.8786,0.9812,0.8786
4
+ 2015-03-31,0.11,FEDFUNDS,14.8127,0.9812,0.9016,0.9812,0.9016
5
+ 2015-04-30,0.12,FEDFUNDS,13.4948,0.9794,0.9292,0.9794,0.9292
6
+ 2015-05-31,0.12,FEDFUNDS,13.3385,0.9794,0.9325,0.9794,0.9325
7
+ 2015-06-30,0.13,FEDFUNDS,14.3395,0.9775,0.9115,0.9775,0.9115
8
+ 2015-07-31,0.13,FEDFUNDS,14.3527,0.9775,0.9112,0.9775,0.9112
9
+ 2015-08-31,0.14,FEDFUNDS,19.4281,0.9756,0.8046,0.9756,0.8046
10
+ 2015-09-30,0.14,FEDFUNDS,24.3771,0.9756,0.7007,0.9756,0.7007
11
+ 2015-10-31,0.12,FEDFUNDS,16.7895,0.9794,0.86,0.9794,0.86
12
+ 2015-11-30,0.12,FEDFUNDS,16.21,0.9794,0.8722,0.9794,0.8722
13
+ 2015-12-31,0.24,FEDFUNDS,18.0255,0.9569,0.8341,0.9569,0.8341
14
+ 2016-01-31,0.34,FEDFUNDS,23.7179,0.9381,0.7145,0.9381,0.7145
15
+ 2016-02-29,0.38,FEDFUNDS,22.517,0.9306,0.7397,0.9306,0.7397
16
+ 2016-03-31,0.36,FEDFUNDS,15.8491,0.9344,0.8798,0.9344,0.8798
17
+ 2016-04-30,0.37,FEDFUNDS,14.3005,0.9325,0.9123,0.9325,0.9123
18
+ 2016-05-31,0.37,FEDFUNDS,14.8529,0.9325,0.9007,0.9325,0.9007
19
+ 2016-06-30,0.38,FEDFUNDS,17.7745,0.9306,0.8393,0.9306,0.8393
20
+ 2016-07-31,0.39,FEDFUNDS,13.1585,0.9287,0.9363,0.9287,0.9363
21
+ 2016-08-31,0.4,FEDFUNDS,12.3996,0.9269,0.9522,0.9269,0.9522
22
+ 2016-09-30,0.4,FEDFUNDS,14.2195,0.9269,0.914,0.9269,0.914
23
+ 2016-10-31,0.4,FEDFUNDS,14.5852,0.9269,0.9063,0.9269,0.9063
24
+ 2016-11-30,0.41,FEDFUNDS,15.2362,0.925,0.8927,0.925,0.8927
25
+ 2016-12-31,0.54,FEDFUNDS,12.4724,0.9006,0.9507,0.9006,0.9507
26
+ 2017-01-31,0.65,FEDFUNDS,11.6085,0.88,0.9689,0.88,0.9689
27
+ 2017-02-28,0.66,FEDFUNDS,11.5305,0.8781,0.9705,0.8781,0.9705
28
+ 2017-03-31,0.79,FEDFUNDS,11.8978,0.8537,0.9628,0.8537,0.9628
29
+ 2017-04-30,0.9,FEDFUNDS,13.1363,0.8331,0.9368,0.8331,0.9368
30
+ 2017-05-31,0.91,FEDFUNDS,10.8623,0.8312,0.9845,0.8312,0.9845
31
+ 2017-06-30,1.04,FEDFUNDS,10.5136,0.8069,0.9918,0.8069,0.9918
32
+ 2017-07-31,1.15,FEDFUNDS,10.2645,0.7862,0.9971,0.7862,0.9971
33
+ 2017-08-31,1.16,FEDFUNDS,11.9757,0.7844,0.9611,0.7844,0.9611
34
+ 2017-09-30,1.15,FEDFUNDS,10.438,0.7862,0.9934,0.7862,0.9934
35
+ 2017-10-31,1.15,FEDFUNDS,10.1255,0.7862,1.0,0.7862,1.0
36
+ 2017-11-30,1.16,FEDFUNDS,10.5405,0.7844,0.9913,0.7844,0.9913
37
+ 2017-12-31,1.3,FEDFUNDS,10.2645,0.7581,0.9971,0.7581,0.9971
38
+ 2018-01-31,1.41,FEDFUNDS,11.0624,0.7375,0.9803,0.7375,0.9803
39
+ 2018-02-28,1.42,FEDFUNDS,22.4647,0.7356,0.7408,0.7356,0.7408
40
+ 2018-03-31,1.51,FEDFUNDS,19.0238,0.7187,0.8131,0.7187,0.8131
41
+ 2018-04-30,1.742,SOFR,18.2676,0.6752,0.829,0.6752,0.829
42
+ 2018-05-31,1.7305,SOFR,14.1245,0.6774,0.916,0.6774,0.916
43
+ 2018-06-30,1.8367,SOFR,13.6781,0.6575,0.9254,0.6575,0.9254
44
+ 2018-07-31,1.9138,SOFR,13.1476,0.643,0.9365,0.643,0.9365
45
+ 2018-08-31,1.9174,SOFR,12.547,0.6424,0.9491,0.6424,0.9491
46
+ 2018-09-30,1.9684,SOFR,12.9105,0.6328,0.9415,0.6328,0.9415
47
+ 2018-10-31,2.1841,SOFR,19.3522,0.5923,0.8062,0.5923,0.8062
48
+ 2018-11-30,2.2205,SOFR,19.389,0.5855,0.8054,0.5855,0.8054
49
+ 2018-12-31,2.3505,SOFR,24.9532,0.5611,0.6886,0.5611,0.6886
50
+ 2019-01-31,2.4724,SOFR,19.5724,0.5383,0.8016,0.5383,0.8016
51
+ 2019-02-28,2.4042,SOFR,15.2347,0.5511,0.8927,0.5511,0.8927
52
+ 2019-03-31,2.4171,SOFR,14.4852,0.5487,0.9084,0.5487,0.9084
53
+ 2019-04-30,2.4762,SOFR,12.949,0.5376,0.9407,0.5376,0.9407
54
+ 2019-05-31,2.4205,SOFR,16.7218,0.548,0.8615,0.548,0.8615
55
+ 2019-06-30,2.393,SOFR,15.836,0.5532,0.8801,0.5532,0.8801
56
+ 2019-07-31,2.4495,SOFR,13.3059,0.5426,0.9332,0.5426,0.9332
57
+ 2019-08-31,2.1282,SOFR,18.9791,0.6028,0.814,0.6028,0.814
58
+ 2019-09-30,2.2715,SOFR,15.559,0.576,0.8859,0.576,0.8859
59
+ 2019-10-31,1.8641,SOFR,15.4665,0.6523,0.8878,0.6523,0.8878
60
+ 2019-11-30,1.5726,SOFR,12.5235,0.707,0.9496,0.707,0.9496
61
+ 2019-12-31,1.5462,SOFR,13.7567,0.712,0.9237,0.712,0.9237
62
+ 2020-01-31,1.5481,SOFR,13.941,0.7116,0.9199,0.7116,0.9199
63
+ 2020-02-29,1.5858,SOFR,19.6289,0.7045,0.8004,0.7045,0.8004
64
+ 2020-03-31,0.6095,SOFR,57.7368,0.8876,0.0,0.8876,0.0
65
+ 2020-04-30,0.0195,SOFR,41.4538,0.9982,0.342,0.9982,0.342
66
+ 2020-05-31,0.0455,SOFR,30.897,0.9933,0.5637,0.9933,0.5637
67
+ 2020-06-30,0.0791,SOFR,31.1195,0.987,0.5591,0.987,0.5591
68
+ 2020-07-31,0.1055,SOFR,26.8405,0.9821,0.6489,0.9821,0.6489
69
+ 2020-08-31,0.0857,SOFR,22.8895,0.9858,0.7319,0.9858,0.7319
70
+ 2020-09-30,0.0857,SOFR,27.6476,0.9858,0.632,0.9858,0.632
71
+ 2020-10-31,0.0871,SOFR,29.4386,0.9855,0.5944,0.9855,0.5944
72
+ 2020-11-30,0.0863,SOFR,24.9955,0.9857,0.6877,0.9857,0.6877
73
+ 2020-12-31,0.0823,SOFR,22.3741,0.9864,0.7427,0.9864,0.7427
74
+ 2021-01-31,0.0711,SOFR,24.91,0.9885,0.6895,0.9885,0.6895
75
+ 2021-02-28,0.0416,SOFR,23.1405,0.9941,0.7266,0.9941,0.7266
76
+ 2021-03-31,0.0152,SOFR,21.843,0.999,0.7539,0.999,0.7539
77
+ 2021-04-30,0.01,SOFR,17.4162,1.0,0.8469,1.0,0.8469
78
+ 2021-05-31,0.01,SOFR,19.7605,1.0,0.7976,1.0,0.7976
79
+ 2021-06-30,0.0282,SOFR,16.9568,0.9966,0.8565,0.9966,0.8565
80
+ 2021-07-31,0.05,SOFR,17.6033,0.9925,0.8429,0.9925,0.8429
81
+ 2021-08-31,0.05,SOFR,17.4727,0.9925,0.8457,0.9925,0.8457
82
+ 2021-09-30,0.05,SOFR,19.8248,0.9925,0.7963,0.9925,0.7963
83
+ 2021-10-31,0.0465,SOFR,17.8714,0.9932,0.8373,0.9932,0.8373
84
+ 2021-11-30,0.05,SOFR,18.5005,0.9925,0.8241,0.9925,0.8241
85
+ 2021-12-31,0.0495,SOFR,21.3545,0.9926,0.7642,0.9926,0.7642
86
+ 2022-01-31,0.048,SOFR,23.181,0.9929,0.7258,0.9929,0.7258
87
+ 2022-02-28,0.0495,SOFR,25.7484,0.9926,0.6719,0.9926,0.6719
88
+ 2022-03-31,0.1613,SOFR,26.9687,0.9716,0.6462,0.9716,0.6462
89
+ 2022-04-30,0.286,SOFR,24.3735,0.9482,0.7007,0.9482,0.7007
90
+ 2022-05-31,0.7162,SOFR,29.3136,0.8676,0.597,0.8676,0.597
91
+ 2022-06-30,1.0967,SOFR,28.2332,0.7962,0.6197,0.7962,0.6197
92
+ 2022-07-31,1.607,SOFR,24.9952,0.7006,0.6877,0.7006,0.6877
93
+ 2022-08-31,2.2835,SOFR,22.1696,0.5737,0.747,0.5737,0.747
94
+ 2022-09-30,2.5114,SOFR,27.3418,0.531,0.6384,0.531,0.6384
95
+ 2022-10-31,3.0365,SOFR,30.0057,0.4325,0.5824,0.4325,0.5824
96
+ 2022-11-30,3.722,SOFR,23.2991,0.304,0.7233,0.304,0.7233
97
+ 2022-12-31,4.0657,SOFR,21.7843,0.2395,0.7551,0.2395,0.7551
98
+ 2023-01-31,4.3045,SOFR,20.169,0.1948,0.7891,0.1948,0.7891
99
+ 2023-02-28,4.5379,SOFR,20.1205,0.151,0.7901,0.151,0.7901
100
+ 2023-03-31,4.6357,SOFR,21.6443,0.1327,0.7581,0.1327,0.7581
101
+ 2023-04-30,4.8063,SOFR,17.8179,0.1007,0.8384,0.1007,0.8384
102
+ 2023-05-31,5.0227,SOFR,17.6361,0.0601,0.8423,0.0601,0.8423
103
+ 2023-06-30,5.0562,SOFR,14.0032,0.0538,0.9186,0.0538,0.9186
104
+ 2023-07-31,5.0945,SOFR,13.9324,0.0466,0.92,0.0466,0.92
105
+ 2023-08-31,5.3009,SOFR,15.8539,0.0079,0.8797,0.0079,0.8797
106
+ 2023-09-30,5.306,SOFR,15.1733,0.007,0.894,0.007,0.894
107
+ 2023-10-31,5.3114,SOFR,18.8877,0.006,0.816,0.006,0.816
108
+ 2023-11-30,5.319,SOFR,14.0191,0.0045,0.9182,0.0045,0.9182
109
+ 2023-12-31,5.3355,SOFR,12.7185,0.0014,0.9455,0.0014,0.9455
110
+ 2024-01-31,5.321,SOFR,13.3886,0.0042,0.9315,0.0042,0.9315
111
+ 2024-02-29,5.309,SOFR,13.9805,0.0064,0.919,0.0064,0.919
112
+ 2024-03-31,5.313,SOFR,13.7875,0.0057,0.9231,0.0057,0.9231
113
+ 2024-04-30,5.3168,SOFR,16.1377,0.005,0.8737,0.005,0.8737
114
+ 2024-05-31,5.3145,SOFR,13.0587,0.0054,0.9384,0.0054,0.9384
115
+ 2024-06-30,5.3253,SOFR,12.667,0.0034,0.9466,0.0034,0.9466
116
+ 2024-07-31,5.3432,SOFR,14.3739,0.0,0.9108,0.0,0.9108
117
+ 2024-08-31,5.3327,SOFR,19.3123,0.002,0.807,0.002,0.807
118
+ 2024-09-30,5.1455,SOFR,17.6633,0.0371,0.8417,0.0371,0.8417
119
+ 2024-10-31,4.8491,SOFR,19.9609,0.0926,0.7934,0.0926,0.7934
120
+ 2024-11-30,4.6437,SOFR,16.0152,0.1312,0.8763,0.1312,0.8763
121
+ 2024-12-31,4.5319,SOFR,15.8662,0.1521,0.8794,0.1521,0.8794
122
+ 2025-01-31,4.3157,SOFR,16.7636,0.1927,0.8606,0.1927,0.8606
123
+ 2025-02-28,4.3437,SOFR,16.968,0.1874,0.8563,0.1874,0.8563
124
+ 2025-03-31,4.3267,SOFR,21.8414,0.1906,0.7539,0.1906,0.7539
125
+ 2025-04-30,4.3486,SOFR,31.9662,0.1865,0.5413,0.1865,0.5413
126
+ 2025-05-31,4.3052,SOFR,20.4623,0.1946,0.7829,0.1946,0.7829
127
+ 2025-06-30,4.3165,SOFR,18.4033,0.1925,0.8261,0.1925,0.8261
128
+ 2025-07-31,4.3368,SOFR,16.3813,0.1887,0.8686,0.1887,0.8686
129
+ 2025-08-31,4.3443,SOFR,15.75,0.1873,0.8819,0.1873,0.8819
130
+ 2025-09-30,4.2995,SOFR,15.7891,0.1957,0.881,0.1957,0.881
131
+ 2025-10-31,4.2009,SOFR,18.0865,0.2142,0.8328,0.2142,0.8328
132
+ 2025-11-30,3.9778,SOFR,19.7695,0.256,0.7974,0.256,0.7974
133
+ 2025-12-31,3.8,SOFR,15.5482,0.2894,0.8861,0.2894,0.8861
data_collect/simulator_logic.md ADDED
@@ -0,0 +1,1209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Environment Simulator Logic
2
+
3
+ This document defines the complete simulation framework for the CFO environment, including **backend state tracking**, **financial statement generation**, **fundraising success simulation**, and **stochastic evaluation design**. All modules share a common monthly time axis `t = 0, 1, 2, ..., T`, and the agent only observes information up to the current time `t`.
4
+
5
+ ---
6
+
7
+ ## Module A: Backend Tracking (Ledger)
8
+
9
+ ### Purpose
10
+
11
+ Maintain a running ledger of the company's financial state at each month. The system tracks **two parallel views**:
12
+
13
+ 1. **P&L Ledger** (accrual basis) — revenue and costs recognized when *earned/incurred*
14
+ 2. **Cash Ledger** (cash basis) — actual money entering/leaving the bank account
15
+
16
+ The ledger is **append-only** and the agent can only read `[0, t]` — no future information is visible.
17
+
18
+ **Simulation boundaries** (from `config.json`):
19
+ - Start date: `company_config.initial_date` (e.g., 2005-01-01)
20
+ - Max duration: `environment_config.max_episode_months` (e.g., 300 months)
21
+ - The simulation runs from `t = 0` to at most `t = max_episode_months`, or until cash goes negative.
22
+
23
+ ### A.1 Core State Variables
24
+
25
+ At each month `t`, the backend tracks:
26
+
27
+ **Business State:**
28
+
29
+ | Field | Description | Source / Logic |
30
+ |-------|-------------|----------------|
31
+ | `t` | Month index (0-based) | System clock |
32
+ | `date` | Calendar month-end date | `combined_economic_data_2015_2025.csv` |
33
+ | `active_users` | Monthly active borrowers | Simulated (see A.2) |
34
+ | `net_new_users` | New borrowers this month | `Users(t) − Users(t-1)` |
35
+ | `loan_portfolio_gross` | Total outstanding loans (gross) | Running balance (see A.6) |
36
+ | `allowance` | Allowance for credit losses | Running balance (see A.6) |
37
+ | `lending_rate` | Annual lending rate | `Tsy2Y(t)/100 + Baa_Yield(t)/100` |
38
+
39
+ **P&L (Accrual Basis):**
40
+
41
+ | Field | Description | Source / Logic |
42
+ |-------|-------------|----------------|
43
+ | `revenue` | Interest income accrued | `Loan_Portfolio_Gross × Lending_Rate / 12` |
44
+ | `credit_loss_provision` | Expected loan losses | `Revenue × (1 − Gross_Margin) × Provision_Share` |
45
+ | `cogs` | Cost of goods sold | `Revenue × (1 − Gross_Margin)` |
46
+ | `gross_profit` | Gross profit | `Revenue − COGS` |
47
+ | `opex` | Operating expenses | `Gross_Profit − EBITDA` |
48
+ | `ebitda` | EBITDA | `Revenue × EBITDA_Margin` |
49
+ | `interest_expense` | Interest on company's debt | Sum of `principal × rate / 12` per debt instrument |
50
+ | `net_income` | Bottom line | `EBITDA − Interest_Expense − Taxes` |
51
+
52
+ **Cash (Bank Account):**
53
+
54
+ | Field | Description | Source / Logic |
55
+ |-------|-------------|----------------|
56
+ | `cash_balance` | Actual bank balance | Previous + all cash inflows − all cash outflows |
57
+ | `cash_in_interest` | Borrower interest payments received | `Revenue(t-1) × Collection_Rate` (lagged) |
58
+ | `cash_in_principal` | Borrower principal repayments | `Loan_Portfolio_Gross(t-1) / Avg_Loan_Term × Collection_Rate` (lagged) |
59
+ | `cash_out_originations` | New loans funded | `max(0, Net_New_Users(t)) × Avg_Loan_Size` (immediate) |
60
+ | `cash_out_servicing` | Servicing cost payments | `Servicing_Costs(t-1)` (lagged) |
61
+ | `cash_out_opex` | Operating cost payments | `OpEx(t-1)` (lagged) |
62
+ | `cash_out_debt_interest` | Debt interest paid | Same month |
63
+ | `cash_out_debt_repayment` | Debt principal paid | Scheduled payment |
64
+ | `cash_in_fundraising` | Funds received from raises | Same month (if success) |
65
+
66
+ **Balance Sheet Running Balances:**
67
+
68
+ | Field | Description | Source / Logic |
69
+ |-------|-------------|----------------|
70
+ | `interest_receivable` | Accrued revenue awaiting collection | `Revenue(t)` — cleared next month |
71
+ | `principal_receivable` | Scheduled repayment awaiting cash | `Loan_Portfolio_Gross(t) / Avg_Loan_Term` |
72
+ | `accounts_payable` | Accrued costs awaiting payment | `OpEx(t) + Servicing_Costs(t)` — paid next month |
73
+ | `write_offs` | Bad loans removed from books | `Credit_Loss_Provision(t-4)` — non-cash |
74
+
75
+ **Ownership & Capital:**
76
+
77
+ | Field | Description | Source / Logic |
78
+ |-------|-------------|----------------|
79
+ | `total_debt` | Outstanding debt principal | Cumulative from fundraising events |
80
+ | `total_equity_raised` | Cumulative equity raised | Cumulative from fundraising events |
81
+ | `shares_outstanding` | Current total shares | Updated on equity raises |
82
+
83
+ ### A.2 Revenue & User Simulation
84
+
85
+ Revenue and users evolve monthly based on indicators from `combined_economic_data_2015_2025.csv`.
86
+
87
+ > **Adjusted Columns Convention:** The simulation uses `adj_Monthly_User_Growth` (not the original `Monthly_User_Growth`) to drive user growth. The `adj_` columns contain amplified growth bumps at three checkpoint periods (months 23-36, 53-62, 106-117) that create cash liquidity traps for the lending company. Original columns are preserved in the CSV for reference. Similarly, fundraising probabilities use `adj_P_debt` and `adj_P_equity` from `fundraising_success_probabilities_2015_2025.csv`.
88
+
89
+ **Active Users (Borrowers):**
90
+
91
+ ```
92
+ Users(t) = Users(t-1) × (1 + adj_Monthly_User_Growth(t) / 100)
93
+ Net_New(t) = Users(t) − Users(t-1)
94
+ ```
95
+
96
+ **Loan Portfolio (Gross) — Running Balance:**
97
+
98
+ The gross loan portfolio is tracked as a running balance (see A.6 for full logic):
99
+
100
+ ```
101
+ Loan_Portfolio_Gross(t) = Loan_Portfolio_Gross(t-1)
102
+ + New_Originations(t)
103
+ − Scheduled_Principal_Repayment(t)
104
+ − Write_Offs(t)
105
+ ```
106
+
107
+ > `Avg_Loan_Size` = $10,000 (fixed, from `config.json → company_config.average_loan_size`)
108
+ > At t=0: `Loan_Portfolio_Gross(0) = initial_customers × Avg_Loan_Size`
109
+
110
+ **Revenue (Interest Income) — Accrual:**
111
+
112
+ The company earns interest on its gross loan portfolio. The lending rate = risk-free base rate + credit spread:
113
+
114
+ ```
115
+ Lending_Rate(t) = Tsy2Y(t) / 100 + Baa_Yield(t) / 100
116
+ Revenue(t) = Loan_Portfolio_Gross(t) × Lending_Rate(t) / 12
117
+ ```
118
+
119
+ > `Tsy2Y(t)` = 2-Year Treasury yield from `combined_economic_data_2015_2025.csv`
120
+ > `Baa_Yield(t)` = ICE BofA Corporate Bond OAS (credit spread) from `combined_economic_data_2015_2025.csv`
121
+ > `loan_term_years` = 2 (from `config.json → company_config.loan_term_years`)
122
+ > Divide by 12 because rates are annual but revenue is monthly
123
+ >
124
+ > **Why Tsy2Y?** The base rate matches the loan duration — 2-year loans use the 2-Year Treasury yield as the risk-free benchmark.
125
+ >
126
+ > **Why Baa_Yield?** This is the market credit spread (OAS), not an absolute yield. It captures the risk premium the market demands for lending — widens during crises (e.g., 2.58% in Mar 2020), tightens in calm periods (e.g., 0.77% in Sep 2025). Both components are fully dynamic from the environment.
127
+
128
+ **Cost Breakdown — Accrual:**
129
+
130
+ ```
131
+ COGS(t) = Revenue(t) × (1 − Gross_Margin(t) / 100)
132
+ └─ Credit_Loss_Provision(t) = COGS(t) × Provision_Share
133
+ └─ Servicing_Costs(t) = COGS(t) × (1 − Provision_Share)
134
+ Gross_Profit(t) = Revenue(t) − COGS(t)
135
+ EBITDA(t) = Revenue(t) × EBITDA_Margin(t) / 100
136
+ OpEx(t) = Gross_Profit(t) − EBITDA(t)
137
+ ```
138
+
139
+ > `Provision_Share` = 0.40 (from `config.json`) — 40% of COGS is credit loss provision (non-cash), 60% is servicing costs
140
+
141
+ ### A.3 Accrual vs. Cash: Timing Lags
142
+
143
+ A lending company has significant timing differences between when items appear on the P&L and when cash actually moves. This section explains each lag.
144
+
145
+ #### Interest Revenue → Cash Collection (lag: **1 month**)
146
+
147
+ Interest income is *accrued* on the P&L in the month it's earned. But cash arrives when borrowers make their monthly payment, which involves processing time (ACH settlement, payment posting). Additionally, not all borrowers pay — some are delinquent or default.
148
+
149
+ ```
150
+ Cash_In_Interest(t) = Revenue(t-1) × Collection_Rate
151
+ ```
152
+
153
+ > `Collection_Rate` = 0.96 (96%, from `config.json`) — 4% of accrued interest is never collected
154
+ > At `t=0`, there is no prior month, so `Cash_In_Interest(0) = 0`
155
+
156
+ #### Principal Repayments → Cash In (lag: **1 month**)
157
+
158
+ When borrowers make monthly payments, part goes to interest (above) and part repays principal. Principal repayments are NOT revenue — they reduce the loan asset on the balance sheet. But they are real cash inflows.
159
+
160
+ ```
161
+ Monthly_Principal_Rate = 1 / Avg_Loan_Term_Months
162
+ Cash_In_Principal(t) = Loan_Portfolio_Gross(t-1) × Monthly_Principal_Rate × Collection_Rate
163
+ ```
164
+
165
+ > `Avg_Loan_Term_Months` = 24 (from `config.json`) — 2-year loan term
166
+ > This is cash coming back from the existing portfolio each month
167
+
168
+ #### New Loan Originations → Cash Out (lag: **0 months, immediate**)
169
+
170
+ When new borrowers are onboarded, the company must fund their loans immediately from its bank account. This is the biggest cash drain for a growing lender — it is NOT an expense on the P&L (it becomes an asset), but it consumes cash.
171
+
172
+ ```
173
+ Cash_Out_Originations(t) = max(0, Net_New_Users(t)) × Avg_Loan_Size
174
+ ```
175
+
176
+ > If users decline (negative growth), no origination cash outflow occurs
177
+ > This creates the key tension: **fast growth = high P&L revenue but heavy cash burn**
178
+
179
+ #### Credit Loss Provision → Write-off (lag: **4 months**, non-cash)
180
+
181
+ Credit losses are *provisioned* on the P&L when loans are originated or risk is assessed. This is a **non-cash** accrual that increases the Allowance for Credit Losses (a contra-asset on the Balance Sheet).
182
+
183
+ When a borrower becomes 90-120+ days delinquent (roughly 4 months later), the loan is **written off**. A write-off is a **Balance Sheet reclassification only** — it does NOT cause cash to leave the bank:
184
+
185
+ ```
186
+ Write_Off(t) = Credit_Loss_Provision(t-4)
187
+
188
+ Balance Sheet entry:
189
+ Loan Portfolio (Gross) ↓ by Write_Off amount
190
+ Allowance for Credit Losses ↓ by Write_Off amount
191
+ Loan Portfolio (Net) unchanged (gross and allowance both decrease)
192
+ ```
193
+
194
+ > At early months (`t < 4`), no write-offs have matured yet, so `Write_Off = 0`
195
+ > The cash impact of defaults is already captured through `Collection_Rate < 100%`: borrowers who default stop making interest and principal payments, so `Cash_In_Interest` and `Cash_In_Principal` are reduced accordingly.
196
+
197
+ #### Operating Expenses → Cash Out (lag: **1 month**)
198
+
199
+ OpEx includes salaries, technology, marketing, rent, etc. Salaries are paid same-month, but vendor invoices are typically net-30. Blended across all OpEx:
200
+
201
+ ```
202
+ Cash_Out_OpEx(t) = OpEx(t-1)
203
+ ```
204
+
205
+ > At `t=0`, `Cash_Out_OpEx(0) = 0`
206
+
207
+ #### Servicing Costs → Cash Out (lag: **1 month**)
208
+
209
+ The non-provision portion of COGS (payment processing, customer support, loan servicing):
210
+
211
+ ```
212
+ Cash_Out_Servicing(t) = Servicing_Costs(t-1)
213
+ ```
214
+
215
+ > `servicing_lag_months` = 1 (from `config.json`)
216
+
217
+ #### Company Debt Interest → Cash Out (lag: **0 months, same month**)
218
+
219
+ Interest the company owes on its own debt (from fundraising) is accrued and paid in the same month.
220
+
221
+ ```
222
+ Cash_Out_Debt_Interest(t) = Interest_Expense(t)
223
+ ```
224
+
225
+ #### Company Debt Repayment → Cash Out (lag: **0 months, scheduled**)
226
+
227
+ Principal repayments on the company's debt follow the amortization schedule.
228
+
229
+ ```
230
+ Cash_Out_Debt_Repayment(t) = scheduled amount per debt_instruments table
231
+ ```
232
+
233
+ > Repayment type: `environment_config.debt_repayment_type` (default: `"amortizing"`)
234
+ > Default maturity: `environment_config.debt_maturity_months` (default: 36 months)
235
+
236
+ #### Fundraising Proceeds → Cash In (lag: **0 months, immediate**)
237
+
238
+ When a fundraising round succeeds, cash arrives immediately.
239
+
240
+ ```
241
+ Cash_In_Fundraising(t) = Amount_Raised (if success, else 0)
242
+ ```
243
+
244
+ #### Summary Table
245
+
246
+ | P&L Item (Accrual) | Cash Event | Lag | Rate/Adjustment |
247
+ |---------------------|------------|-----|-----------------|
248
+ | Revenue (interest accrued) | Borrower interest payments received | **t+1** | × Collection_Rate (96%) |
249
+ | *(not on P&L)* | Borrower principal repayments received | **t+1** | × Collection_Rate (96%) |
250
+ | *(not on P&L)* | New loan originations funded | **t+0** | immediate, full amount |
251
+ | Credit Loss Provision | Write-off (BS reclassification, **non-cash**) | **t+4** | Gross ↓, Allowance ↓, Net unchanged |
252
+ | Servicing Costs (COGS) | Servicing payments | **t+1** | accrued amount |
253
+ | OpEx | Vendor/salary payments | **t+1** | accrued amount |
254
+ | Interest Expense (debt) | Debt interest paid | **t+0** | same month |
255
+ | *(not on P&L)* | Debt principal repayment | **t+0** | per schedule |
256
+ | *(not on P&L)* | Fundraising proceeds | **t+0** | if success |
257
+
258
+ ### A.4 Cash Balance Update
259
+
260
+ Each month, the **actual bank balance** is updated using **cash-basis** items only:
261
+
262
+ ```
263
+ Cash(t) = Cash(t-1)
264
+
265
+ + Cash_In_Interest(t) Revenue(t-1) × Collection_Rate
266
+ + Cash_In_Principal(t) Loan_Portfolio_Gross(t-1) / Avg_Loan_Term × Collection_Rate
267
+ + Cash_In_Fundraising(t) if fundraising succeeds this month
268
+
269
+ − Cash_Out_Originations(t) Net_New_Users(t) × Avg_Loan_Size
270
+ − Cash_Out_Servicing(t) Servicing_Costs(t-1)
271
+ − Cash_Out_OpEx(t) OpEx(t-1)
272
+ − Cash_Out_Debt_Interest(t) Interest_Expense(t)
273
+ − Cash_Out_Debt_Repayment(t) per amortization schedule
274
+ ```
275
+
276
+ > **Key insight:** A lending company can be **profitable on the P&L but cash-negative** if it grows quickly. New loan originations drain cash immediately, while interest income trickles in over months. This forces the CFO agent to balance growth ambition with liquidity management — and fundraise at the right time.
277
+
278
+ ### A.5 Storage Schema
279
+
280
+ **P&L Ledger** (accrual basis, one row per month-end):
281
+
282
+ ```
283
+ pnl_ledger (
284
+ t INT PRIMARY KEY,
285
+ date DATE, -- month-end date (e.g., 2015-01-31)
286
+ active_users BIGINT,
287
+ net_new_users BIGINT,
288
+ lending_rate DECIMAL,
289
+
290
+ -- P&L items (accrual)
291
+ revenue DECIMAL,
292
+ credit_loss_provision DECIMAL,
293
+ servicing_costs DECIMAL,
294
+ cogs DECIMAL,
295
+ gross_profit DECIMAL,
296
+ opex DECIMAL,
297
+ ebitda DECIMAL,
298
+ interest_expense DECIMAL,
299
+ net_income DECIMAL,
300
+
301
+ -- Balance Sheet running balances
302
+ loan_portfolio_gross DECIMAL, -- running balance (see A.6)
303
+ allowance DECIMAL, -- running balance (see A.6)
304
+ interest_receivable DECIMAL, -- Revenue(t), cleared at t+1
305
+ principal_receivable DECIMAL, -- scheduled repayment, cleared at t+1
306
+ accounts_payable DECIMAL, -- OpEx(t) + Servicing_Costs(t), cleared at t+1
307
+ write_offs DECIMAL -- Credit_Loss_Provision(t-4), non-cash
308
+ )
309
+ ```
310
+
311
+ **Cash Ledger** (cash basis, one row per month-end):
312
+
313
+ ```
314
+ cash_ledger (
315
+ t INT PRIMARY KEY,
316
+ date DATE, -- month-end date (e.g., 2015-01-31)
317
+ cash_in_interest DECIMAL, -- Revenue(t-1) × Collection_Rate
318
+ cash_in_principal DECIMAL, -- portfolio principal repayments
319
+ cash_in_fundraising DECIMAL, -- 0 unless fundraising succeeds
320
+ cash_out_originations DECIMAL, -- new loans funded
321
+ cash_out_servicing DECIMAL, -- Servicing_Costs(t-1)
322
+ cash_out_opex DECIMAL, -- OpEx(t-1)
323
+ cash_out_debt_interest DECIMAL, -- same month
324
+ cash_out_debt_repayment DECIMAL, -- per schedule
325
+ net_cash_flow DECIMAL, -- sum of all above
326
+ cash_balance DECIMAL -- running bank balance
327
+ )
328
+ ```
329
+
330
+ **Auxiliary tables:**
331
+
332
+ ```
333
+ debt_instruments (
334
+ id INT PRIMARY KEY,
335
+ issued_at INT, -- month t when issued
336
+ principal DECIMAL,
337
+ rate DECIMAL, -- annual interest rate
338
+ maturity_months INT,
339
+ remaining_principal DECIMAL
340
+ )
341
+
342
+ equity_rounds (
343
+ id INT PRIMARY KEY,
344
+ issued_at INT, -- month t when issued
345
+ amount_raised DECIMAL,
346
+ shares_issued BIGINT,
347
+ price_per_share DECIMAL,
348
+ investor_label TEXT
349
+ )
350
+
351
+ capital_summary (
352
+ t INT PRIMARY KEY,
353
+ total_debt DECIMAL,
354
+ total_equity_raised DECIMAL,
355
+ shares_outstanding BIGINT
356
+ )
357
+ ```
358
+
359
+ ### A.6 Loan Portfolio & Allowance Tracking
360
+
361
+ The loan portfolio and allowance are tracked as **running balances** to ensure the Balance Sheet always balances.
362
+
363
+ **Loan Portfolio (Gross):**
364
+
365
+ ```
366
+ Loan_Portfolio_Gross(t) = Loan_Portfolio_Gross(t-1)
367
+ + New_Originations(t)
368
+ − Scheduled_Principal_Repayment(t)
369
+ − Write_Offs(t)
370
+ ```
371
+
372
+ Where:
373
+ - `New_Originations(t)` = `max(0, Net_New_Users(t)) × Avg_Loan_Size`
374
+ - `Scheduled_Principal_Repayment(t)` = `Loan_Portfolio_Gross(t-1) / Avg_Loan_Term_Months`
375
+ - `Write_Offs(t)` = `Credit_Loss_Provision(t - 4)` (bad loans removed from books after ~4 months delinquent)
376
+
377
+ **Allowance for Credit Losses:**
378
+
379
+ ```
380
+ Allowance(t) = Allowance(t-1)
381
+ + Credit_Loss_Provision(t) provision added (from P&L)
382
+ − Write_Offs(t) used up when loan is written off
383
+ ```
384
+
385
+ > When a write-off occurs, **both** Gross and Allowance decrease by the same amount, so **Net is unchanged**. This is a reclassification, not a new loss — the loss was already recognized when the provision was booked.
386
+
387
+ **Interest Receivable:**
388
+
389
+ ```
390
+ Interest_Receivable(t) = Revenue(t)
391
+ ```
392
+
393
+ > Accrued this month, collected next month. Cleared when Cash_In_Interest arrives at t+1.
394
+ > Uncollected portion (1 − Collection_Rate) is absorbed by the Allowance.
395
+
396
+ **Principal Receivable:**
397
+
398
+ ```
399
+ Principal_Receivable(t) = Scheduled_Principal_Repayment(t)
400
+ ```
401
+
402
+ > Scheduled this month, cash arrives next month. Uncollected portion absorbed by Allowance.
403
+
404
+ **Accounts Payable:**
405
+
406
+ ```
407
+ Accounts_Payable(t) = OpEx(t) + Servicing_Costs(t)
408
+ ```
409
+
410
+ > Accrued this month, paid next month (1-month lag).
411
+
412
+ ### A.7 Initial Balance Sheet (t = 0)
413
+
414
+ At simulation start, the company begins with a pre-existing state. All values must satisfy `A = L + E`:
415
+
416
+ ```
417
+ Assets:
418
+ Cash = initial_cash (from config.json)
419
+ Interest Receivable = 0 (no prior accrual)
420
+ Principal Receivable = 0 (no prior schedule)
421
+ Loan Portfolio (Gross) = initial_customers × Avg_Loan_Size
422
+ Allowance = 0 (no provisions yet)
423
+ Loan Portfolio (Net) = Loan Portfolio (Gross)
424
+ ────────────────────────────────
425
+ Total Assets = initial_cash + initial_customers × Avg_Loan_Size
426
+
427
+ Liabilities:
428
+ Total Debt = initial_debt (from config.json, default 0)
429
+ Accounts Payable = 0 (no prior accrual)
430
+ ────────────────────────────────
431
+ Total Liabilities = initial_debt
432
+
433
+ Equity:
434
+ Paid-in Capital = Total Assets − Total Liabilities (founders funded everything)
435
+ Retained Earnings = 0 (no prior income)
436
+ ────────────────────────────────
437
+ Total Equity = Paid-in Capital
438
+
439
+ Cap Table:
440
+ Shares Outstanding = initial_shares_outstanding (from config.json, default 10,500,000)
441
+ Implied Share Price = initial_share_price (from config.json, default $10.0)
442
+
443
+ Balance check: A = L + E ✓
444
+ ```
445
+
446
+ > With `initial_cash = $15M` and `initial_customers = 5,000 × $10K = $50M`, Total Assets = $65M, Paid-in Capital = $65M.
447
+ > `initial_shares_outstanding = 10,000,000` — matches pre-ESOP Cap Table (Founders 8M + Seed 2M). Implied share price $6.50 × 10M = $65M = Paid-in Capital.
448
+
449
+ ### A.8 Balance Sheet Reconciliation
450
+
451
+ Every monthly event must maintain `A = L + E`. Here is how each event type preserves the equation:
452
+
453
+ **1. New loan origination** (Cash → Loan Portfolio):
454
+ ```
455
+ Cash ↓ $X | Loan Portfolio (Gross) ↑ $X
456
+ Assets net: unchanged | L+E: unchanged ✓
457
+ ```
458
+
459
+ **2. Interest revenue accrual** (P&L → Balance Sheet):
460
+ ```
461
+ Interest Receivable ↑ $Y (Asset ↑)
462
+ Revenue → Net Income → RE ↑ $Y (Equity ↑)
463
+ A ↑ = E ↑ ✓
464
+ ```
465
+
466
+ **3. Interest cash collection at t+1** (Receivable → Cash):
467
+ ```
468
+ Cash ↑ $Y × 96% (Asset ↑)
469
+ Interest Receivable ↓ $Y (Asset ↓)
470
+ Uncollected $Y × 4%:
471
+ Allowance ↓ $Y × 4% (contra-asset ↓ = Asset ↑)
472
+ ... net: absorbed by existing allowance
473
+ A net: unchanged | L+E: unchanged ✓
474
+ ```
475
+
476
+ **4. Credit loss provision** (P&L → Allowance):
477
+ ```
478
+ Allowance ↑ $Z (contra-asset ↑ = Net Assets ↓)
479
+ COGS → Net Income → RE ↓ $Z (Equity ↓)
480
+ A ↓ = E ↓ ✓
481
+ ```
482
+
483
+ **5. Loan write-off** (BS reclassification, non-cash):
484
+ ```
485
+ Loan Portfolio (Gross) ↓ $W (Asset ↓)
486
+ Allowance ↓ $W (contra-asset ↓ = Asset ↑)
487
+ Loan Portfolio (Net): unchanged (↓ and ↑ cancel)
488
+ A: unchanged | L+E: unchanged ✓
489
+ ```
490
+
491
+ **6. OpEx / Servicing accrual** (P&L → AP):
492
+ ```
493
+ Accounts Payable ↑ $V (Liability ↑)
494
+ OpEx → Net Income → RE ↓ $V (Equity ↓)
495
+ L ↑ by $V, E ↓ by $V → L+E: unchanged | A: unchanged ✓
496
+ ```
497
+
498
+ **7. OpEx / Servicing cash payment at t+1**:
499
+ ```
500
+ Cash ↓ $V (Asset ↓)
501
+ Accounts Payable ↓ $V (Liability ↓)
502
+ A ↓ = L ↓ ✓
503
+ ```
504
+
505
+ **8. Principal repayment scheduled** (Loan → Receivable):
506
+ ```
507
+ Loan Portfolio (Gross) ↓ $P (Asset ↓)
508
+ Principal Receivable ↑ $P (Asset ↑)
509
+ A: unchanged | L+E: unchanged ✓
510
+ ```
511
+
512
+ **9. Principal cash collection at t+1**:
513
+ ```
514
+ Cash ↑ $P × 96% (Asset ↑)
515
+ Principal Receivable ↓ $P (Asset ↓)
516
+ Uncollected $P × 4%:
517
+ Allowance ↓ $P × 4% (absorbed by existing allowance)
518
+ A net: unchanged | L+E: unchanged ✓
519
+ ```
520
+
521
+ **10. Fundraising (equity):**
522
+ ```
523
+ Cash ↑ $F (Asset ↑)
524
+ Paid-in Capital ↑ $F (Equity ↑)
525
+ A ↑ = E ↑ ✓
526
+ ```
527
+
528
+ **11. Fundraising (debt):**
529
+ ```
530
+ Cash ↑ $F (Asset ↑)
531
+ Total Debt ↑ $F (Liability ↑)
532
+ A ↑ = L ↑ ✓
533
+ ```
534
+
535
+ **12. Debt interest payment** (same month, accrual = cash):
536
+ ```
537
+ Cash ↓ $I (Asset ↓)
538
+ Interest Expense → RE ↓ $I (Equity ↓)
539
+ A ↓ = E ↓ ✓
540
+ ```
541
+
542
+ **13. Debt principal repayment:**
543
+ ```
544
+ Cash ↓ $D (Asset ↓)
545
+ Total Debt ↓ $D (Liability ↓)
546
+ A ↓ = L ↓ ✓
547
+ ```
548
+
549
+ ### A.9 Visibility Rule
550
+
551
+ At time `t`, the agent can query:
552
+ - `pnl_ledger WHERE t <= current_t`
553
+ - `cash_ledger WHERE t <= current_t`
554
+ - `capital_summary WHERE t <= current_t`
555
+ - `debt_instruments WHERE issued_at <= current_t`
556
+ - `equity_rounds WHERE issued_at <= current_t`
557
+
558
+ No future rows are ever exposed.
559
+
560
+ ---
561
+
562
+ ## Module B: Financial Statement Simulation
563
+
564
+ ### Purpose
565
+
566
+ Generate the three core financial statements (**Income Statement**, **Balance Sheet**, **Cash Flow Statement**) on demand, triggered by specific agent actions.
567
+
568
+ ### B.1 Triggers
569
+
570
+ There are two actions that trigger financial statement generation:
571
+
572
+ | Action | Triggers | Output |
573
+ |--------|----------|--------|
574
+ | `book_closing` | End-of-period close | 3 financial statements (IS, BS, CF) |
575
+ | `fund_raising_request` | Fundraising attempt | 3 financial statements + updated Cap Table |
576
+
577
+ ### B.2 Action: `book_closing`
578
+
579
+ **When:** Agent decides to close the books at current month `t`.
580
+
581
+ **Reporting period:** Always **Year-to-Date (YTD)** — from January of the current year through the current month. For example, if `t` falls in August 2017, the reporting period is Jan 2017 – Aug 2017.
582
+
583
+ ```
584
+ ytd_start = January of the year that date(t) falls in
585
+ ytd_end = date(t)
586
+ ```
587
+
588
+ **Process:**
589
+
590
+ ```
591
+ 1. Determine YTD period:
592
+ ytd_start = first month of the current calendar year
593
+ ytd_end = current month t
594
+
595
+ 2. Freeze both ledgers at month t
596
+
597
+ 3. Generate:
598
+ a. Income Statement (YTD: ytd_start to t)
599
+ b. Balance Sheet (snapshot: as of t)
600
+ c. Cash Flow Statement (YTD: ytd_start to t)
601
+
602
+ 4. Store statements as a versioned snapshot
603
+
604
+ 5. Return statements to the agent
605
+ ```
606
+
607
+ **Income Statement** (YTD: `[ytd_start, t]`):
608
+
609
+ | Line Item | Source |
610
+ |-----------|--------|
611
+ | Revenue | `SUM(pnl_ledger.revenue)` from ytd_start to t |
612
+ | Cost of Goods Sold | `SUM(pnl_ledger.cogs)` from ytd_start to t |
613
+ | Gross Profit | Revenue − COGS |
614
+ | Operating Expenses | `SUM(pnl_ledger.opex)` from ytd_start to t |
615
+ | EBITDA | Gross Profit − OpEx |
616
+ | Interest Expense | `SUM(pnl_ledger.interest_expense)` from ytd_start to t |
617
+ | Pre-tax Income | EBITDA − Interest Expense |
618
+ | Tax (simplified %) | Pre-tax Income × tax_rate |
619
+ | Net Income | Pre-tax Income − Tax |
620
+
621
+ > Example: book_closing in March 2018 → Income Statement covers Jan–Mar 2018
622
+ > Example: book_closing in December 2018 → full-year Income Statement for 2018
623
+
624
+ **Balance Sheet** (snapshot at `t`):
625
+
626
+ | Line Item | Source |
627
+ |-----------|--------|
628
+ | **Assets** | |
629
+ | Cash & Equivalents | `cash_ledger.cash_balance` at t |
630
+ | Interest Receivable | `Revenue(t)` — accrued this month, cash arrives at t+1 |
631
+ | Principal Receivable | `Loan_Portfolio_Gross(t) / Avg_Loan_Term` — scheduled repayment, cash arrives at t+1 |
632
+ | Loan Portfolio (Gross) | Running balance (see A.6) |
633
+ | Less: Allowance for Credit Losses | Running balance (see A.6) |
634
+ | Loan Portfolio (Net) | Gross − Allowance |
635
+ | **Total Assets** | Sum of above |
636
+ | **Liabilities** | |
637
+ | Total Debt | `SUM(debt_instruments.remaining_principal)` at t |
638
+ | Accounts Payable | `OpEx(t) + Servicing_Costs(t)` — accrued this month, paid at t+1 |
639
+ | **Total Liabilities** | Sum of above |
640
+ | **Equity** | |
641
+ | Paid-in Capital | Initial capital + `SUM(equity_rounds.amount_raised)` |
642
+ | Retained Earnings | Cumulative `SUM(pnl_ledger.net_income)` from t=0 to t |
643
+ | **Total Equity** | Paid-in Capital + Retained Earnings |
644
+
645
+ > Balance Sheet is always a point-in-time snapshot — not affected by the YTD period.
646
+ > Balance check: Total Assets = Total Liabilities + Total Equity
647
+ >
648
+ > **Why Interest Receivable?** Revenue is accrued in month t (P&L), but cash arrives in t+1. Without this asset, the balance sheet would have equity (via retained earnings) increasing without a matching asset increase. Interest Receivable bridges the 1-month gap.
649
+ >
650
+ > **Why Principal Receivable?** Same logic — principal repayments are scheduled at t but cash arrives at t+1. This is the portion of the loan portfolio that is "due this month" and waiting for payment processing.
651
+
652
+ **Cash Flow Statement** (YTD: `[ytd_start, t]`, built from `cash_ledger`):
653
+
654
+ | Section | Line Items | Source |
655
+ |---------|-----------|--------|
656
+ | **Operating Activities** | | |
657
+ | Interest received from borrowers | `SUM(cash_in_interest)` ytd_start to t | cash_ledger |
658
+ | Servicing & OpEx paid | `−SUM(cash_out_servicing + cash_out_opex)` ytd_start to t | cash_ledger |
659
+ | *Net Cash from Operations* | *Sum of above* | |
660
+ | **Investing Activities** | | |
661
+ | New loans originated | `−SUM(cash_out_originations)` ytd_start to t | cash_ledger |
662
+ | Principal repayments received | `+SUM(cash_in_principal)` ytd_start to t | cash_ledger |
663
+ | *Net Cash from Investing* | *Sum of above* | |
664
+ | **Financing Activities** | | |
665
+ | Debt raised | `+SUM(cash_in_fundraising)` where type=debt, ytd_start to t | cash_ledger |
666
+ | Equity raised | `+SUM(cash_in_fundraising)` where type=equity, ytd_start to t | cash_ledger |
667
+ | Debt interest paid | `−SUM(cash_out_debt_interest)` ytd_start to t | cash_ledger |
668
+ | Debt principal repaid | `−SUM(cash_out_debt_repayment)` ytd_start to t | cash_ledger |
669
+ | *Net Cash from Financing* | *Sum of above* | |
670
+ | **Net Change in Cash** | Operating + Investing + Financing | |
671
+ | **Beginning Cash** | `cash_ledger.cash_balance` at ytd_start − 1 (prior year-end) | |
672
+ | **Ending Cash** | Beginning + Net Change | |
673
+
674
+ > **Cross-check with Balance Sheet:** Ending Cash on the CF Statement MUST equal Cash & Equivalents on the Balance Sheet. Both are sourced from `cash_ledger.cash_balance` at t.
675
+ >
676
+ > **Cross-check with Income Statement:** Net Income (IS) + non-cash items (provision) − working capital changes (ΔReceivables, ΔPayables) ≈ Net Cash from Operations (CF). This is the indirect method relationship and can be verified as a sanity check.
677
+
678
+ ### B.3 Action: `fund_raising_request`
679
+
680
+ **When:** Agent requests debt or equity fundraising.
681
+
682
+ **Input parameters from agent:**
683
+
684
+ | Parameter | Description |
685
+ |-----------|-------------|
686
+ | `type` | `"debt"` or `"equity"` |
687
+ | `amount` | Requested amount |
688
+ | `terms` | Rate / valuation / maturity (depending on type) |
689
+
690
+ **Process:**
691
+
692
+ ```
693
+ 1. Generate YTD financial statements (same as book_closing, steps 1-5)
694
+ → These represent the company's state "as presented to investors"
695
+
696
+ 2. Determine fundraising success:
697
+ a. Look up P_debt or P_equity for current month t
698
+ (from Module C: Fundraising Success Simulation)
699
+ b. Draw random number r ~ Uniform(0, 1)
700
+ c. success = (r < P_success)
701
+
702
+ 3. If SUCCESS:
703
+ a. For DEBT:
704
+ - Insert into debt_instruments (principal, rate, maturity)
705
+ - Update ledger.total_debt
706
+ - Update ledger.cash_balance += amount_raised
707
+ b. For EQUITY:
708
+ - Calculate new shares: shares_new = amount / price_per_share
709
+ - Insert into equity_rounds
710
+ - Update shares_outstanding += shares_new
711
+ - Update cap_table (recalculate all ownership %)
712
+ - Update ledger.total_equity_raised
713
+ - Update ledger.cash_balance += amount_raised
714
+
715
+ 4. If FAILURE:
716
+ - No changes to ledger, debt_instruments, or equity_rounds
717
+ - Return failure notice to agent
718
+ - Agent may retry in a future month
719
+
720
+ 5. Return:
721
+ - Financial statements (always)
722
+ - Fundraising result (success/failure)
723
+ - Updated cap table (if equity success)
724
+ ```
725
+
726
+ ### B.4 Cap Table Update Logic (Equity Only)
727
+
728
+ On a successful equity raise:
729
+
730
+ ```
731
+ new_shares = amount_raised / price_per_share
732
+ total_shares_after = shares_outstanding + new_shares
733
+
734
+ For each existing shareholder:
735
+ new_ownership% = their_shares / total_shares_after
736
+
737
+ New investor:
738
+ ownership% = new_shares / total_shares_after
739
+ ```
740
+
741
+ **Example:**
742
+
743
+ | Before | Shares | % | | After ($2M at $20M val) | Shares | % |
744
+ |--------|--------|---|-|------------------------|--------|---|
745
+ | Founders | 8,000,000 | 76% | | Founders | 8,000,000 | 72.7% |
746
+ | Seed | 2,000,000 | 19% | | Seed | 2,000,000 | 18.2% |
747
+ | ESOP | 500,000 | 5% | | ESOP | 500,000 | 4.5% |
748
+ | | | | | Series A | 500,000 | 4.5% |
749
+ | **Total** | **10,500,000** | **100%** | | **Total** | **11,000,000** | **100%** |
750
+
751
+ ### B.5 Statement Versioning
752
+
753
+ Each generation is stored with metadata:
754
+
755
+ ```
756
+ financial_snapshots (
757
+ snapshot_id INT PRIMARY KEY,
758
+ trigger TEXT, -- 'book_closing' or 'fund_raising_request'
759
+ t INT, -- month index when generated
760
+ date DATE, -- month-end date (e.g., 2018-03-31)
761
+ ytd_start_date DATE, -- YTD period start (e.g., 2018-01-31)
762
+ fiscal_year INT, -- e.g., 2018
763
+ months_in_period INT, -- e.g., 3 for Jan-Mar
764
+ income_stmt JSON/BLOB, -- YTD: ytd_start to t
765
+ balance_sheet JSON/BLOB, -- Point-in-time snapshot at t
766
+ cashflow_stmt JSON/BLOB, -- YTD: ytd_start to t
767
+ cap_table JSON/BLOB, -- NULL for book_closing
768
+ balance_check BOOLEAN -- Total Assets = Total Liabilities + Total Equity
769
+ )
770
+ ```
771
+
772
+ > Example: book_closing called in March 2018 →
773
+ > `date = 2018-03-31`, `ytd_start_date = 2018-01-31`, `fiscal_year = 2018`, `months_in_period = 3`
774
+
775
+ ---
776
+
777
+ ## Module C: Fundraising Success Simulation
778
+
779
+ Fundraising probability is determined by two layers:
780
+
781
+ 1. **Macro layer** — base probability from CSV, driven by market conditions (VIX, interest rates)
782
+ 2. **Company-state layer** — modifiers that reduce probability based on the company's own financial state
783
+
784
+ ```
785
+ P_adjusted = P_base_csv × company_modifier
786
+ ```
787
+
788
+ ### C.1 Macro Layer: Base Probabilities
789
+
790
+ #### Debt
791
+ - Key driver: **SOFR / Fed Funds** (lower rate → higher success probability)
792
+ - Use SOFR when available (Apr 2018+), fallback to FEDFUNDS
793
+
794
+ ```
795
+ P_debt_base = 1 − (Rate − Rate_min) / (Rate_max − Rate_min)
796
+ ```
797
+
798
+ #### Equity
799
+ - Key driver: **VIX** (lower VIX → higher success probability)
800
+
801
+ ```
802
+ P_equity_base = 1 − (VIX − VIX_min) / (VIX_max − VIX_min)
803
+ ```
804
+
805
+ ### C.2 Company-State Layer: Difficulty Progression
806
+
807
+ #### Equity: Round-Count Decay
808
+
809
+ Each completed equity round makes the next one harder (models "Series A is easier than Series D"):
810
+
811
+ ```
812
+ equity_modifier = equity_round_decay ^ num_completed_equity_rounds
813
+ P_equity = P_equity_base × equity_modifier
814
+ ```
815
+
816
+ With `equity_round_decay = 0.75` (configurable in `environment_config`):
817
+
818
+ | Completed Rounds | Modifier | Effect |
819
+ |------------------|----------|--------|
820
+ | 0 (first raise) | 1.00x | No penalty |
821
+ | 1 | 0.75x | |
822
+ | 2 | 0.56x | |
823
+ | 3 | 0.42x | |
824
+ | 4 | 0.32x | |
825
+ | 5 | 0.24x | |
826
+ | 6+ | ~0.18x | Nearly impossible |
827
+
828
+ #### Debt: Leverage Penalty on Probability
829
+
830
+ High leverage ratio (total_debt / total_equity) reduces debt approval odds. Below a safe threshold, no penalty applies; above it, the modifier declines linearly to zero:
831
+
832
+ ```
833
+ leverage_ratio = total_debt / (paid_in_capital + retained_earnings)
834
+
835
+ if leverage_ratio <= debt_safe_leverage:
836
+ debt_modifier = 1.0
837
+ else:
838
+ excess = leverage_ratio - debt_safe_leverage
839
+ debt_modifier = max(0, 1 - debt_leverage_prob_decay × excess)
840
+
841
+ P_debt = P_debt_base × debt_modifier
842
+ ```
843
+
844
+ With `debt_safe_leverage = 0.5` and `debt_leverage_prob_decay = 1.5`:
845
+
846
+ | Leverage | Modifier | Effect |
847
+ |----------|----------|--------|
848
+ | 0.0–0.5 | 1.00x | Safe zone, no penalty |
849
+ | 0.7 | 0.70x | |
850
+ | 1.0 | 0.25x | |
851
+ | 1.17+ | 0.00 | Impossible |
852
+
853
+ #### Debt: Leverage Spread on Cost
854
+
855
+ Higher leverage increases the interest rate the company pays, on top of the market rate:
856
+
857
+ ```
858
+ base_rate = (Tsy2Y + Baa_Yield) / 100
859
+ leverage_spread = max(0, leverage_ratio - debt_safe_leverage) × debt_leverage_spread_bps / 10000
860
+ cost_rate = base_rate + leverage_spread
861
+ ```
862
+
863
+ With `debt_leverage_spread_bps = 500` (5% per unit of excess leverage):
864
+
865
+ | Leverage | Spread | Effect |
866
+ |----------|--------|--------|
867
+ | 0.3 | +0.0% | Below safe threshold |
868
+ | 0.7 | +1.0% | |
869
+ | 1.0 | +2.5% | |
870
+
871
+ ### C.3 Simulate Success
872
+
873
+ For each fundraising attempt at month `t`:
874
+
875
+ ```python
876
+ prob = P_base_csv × company_modifier # adjusted probability
877
+ roll = random()
878
+ success = roll < prob
879
+ ```
880
+
881
+ ### C.4 Amount Raised & Cost
882
+
883
+ **Amount Raised (on success):**
884
+
885
+ ```
886
+ fill_rate = Uniform(0.7, 1.0)
887
+ Amount_Raised = Fund_Ask × fill_rate
888
+ ```
889
+
890
+ **Cost:**
891
+
892
+ ```
893
+ Debt_Cost = (Tsy2Y + Baa_Yield) / 100 + leverage_spread (annual interest rate, includes company risk)
894
+ Equity_Cost = Fund_Ask / Implied_Valuation (dilution %)
895
+ ```
896
+
897
+ ### C.5 Deferred Settlement
898
+
899
+ Fundraising results are not immediate. Upon submission, the outcome (success/failure) and delivery month are determined but not revealed to the agent:
900
+
901
+ ```
902
+ delivery_month = current_month + randint(fundraising_delivery_min, fundraising_delivery_max)
903
+ ```
904
+
905
+ The agent receives a "submitted" confirmation. At the delivery month, a notification is sent with the result:
906
+ - **If approved:** funds are deposited, balance sheet updated, cap table refreshed (for equity)
907
+ - **If declined:** no changes, agent may retry
908
+
909
+ Config parameters: `fundraising_delivery_min = 1`, `fundraising_delivery_max = 6` (in `environment_config`).
910
+
911
+ ### C.6 Configuration Parameters
912
+
913
+ All fundraising difficulty parameters are in `config.json → environment_config`:
914
+
915
+ ```json
916
+ "equity_round_decay": 0.75,
917
+ "debt_safe_leverage": 0.5,
918
+ "debt_leverage_prob_decay": 1.5,
919
+ "debt_leverage_spread_bps": 500,
920
+ "fundraising_delivery_min": 1,
921
+ "fundraising_delivery_max": 6
922
+ ```
923
+
924
+ ### C.7 Historical Reference (2015–2025)
925
+
926
+ #### Normalization Parameters
927
+
928
+ | Metric | Min | Max |
929
+ |--------|-----|-----|
930
+ | Rate (SOFR/FEDFUNDS) | 0.01% | 5.34% |
931
+ | VIX | 10.13 | 57.74 |
932
+
933
+ #### Summary Statistics
934
+
935
+ | Metric | P_debt | P_equity |
936
+ |--------|--------|----------|
937
+ | Min | 0.00 | 0.00 |
938
+ | Max | 1.00 | 1.00 |
939
+ | Mean | 0.63 | 0.83 |
940
+
941
+ #### Notable Periods
942
+
943
+ | Event | Date | Probability | Driver |
944
+ |-------|------|-------------|--------|
945
+ | **Best for Debt** | Apr 2021 | P_debt = 1.00 | Rate = 0.01% (near-zero rates) |
946
+ | **Worst for Debt** | Jul 2024 | P_debt = 0.00 | Rate = 5.34% (peak rates) |
947
+ | **Best for Equity** | Oct 2017 | P_equity = 1.00 | VIX = 10.13 (lowest volatility) |
948
+ | **Worst for Equity** | Mar 2020 | P_equity = 0.00 | VIX = 57.74 (COVID crash) |
949
+
950
+ > Data source: `fundraising_success_probabilities_2015_2025.csv`
951
+
952
+ ---
953
+
954
+ ## Module D: Stochastic Simulation & Evaluation Design
955
+
956
+ ### D.1 Deterministic vs. Stochastic Components
957
+
958
+ 当前模拟器中各环节可分为两类:
959
+
960
+ #### 确定性逻辑(Deterministic)— 不应加入随机性
961
+
962
+ 这些要素由环境数据或会计公式直接驱动,是"游戏规则"本身,加入随机性会破坏逻辑一致性:
963
+
964
+ | 组件 | 原因 |
965
+ |------|------|
966
+ | 宏观经济指标 (Tsy2Y, Baa_Yield, VIX, FEDFUNDS 等) | 来自真实历史数据,是所有 agent 面对的相同环境 |
967
+ | Lending Rate = Tsy2Y + Baa_Yield | 纯公式,由环境决定 |
968
+ | Revenue = Portfolio × Rate / 12 | 会计恒等式,给定 portfolio 和 rate 后无歧义 |
969
+ | COGS / Gross Profit / EBITDA / OpEx 分解 | 给定 margin 后是纯算术 |
970
+ | 所有 Timing Lag 结构 (1 month, 4 month) | 系统规则,不应随机化 |
971
+ | Cash Balance 更新公式 | 会计恒等式 |
972
+ | 三表生成与配平 (IS, BS, CF) | 会计规则,不容差异 |
973
+ | P_debt / P_equity 计算 | 由环境指标确定的概率值本身是确定的 |
974
+
975
+ #### 可引入随机性(Stochastic)— 增加 episode 间差异
976
+
977
+ 这些要素在现实中本身存在波动,加入噪声可以测试 agent 在不确定环境中的鲁棒性:
978
+
979
+ | 组件 | 当前设计 | 随机化方案 | 理由 |
980
+ |------|----------|-----------|------|
981
+ | **Fundraising 成功/失败** | `random() < P_success` | 保持不变(已经是随机的) | 核心随机性来源 |
982
+ | **Collection Rate** | 固定 0.96 | `clip(N(0.96, σ₁), 0.85, 1.0)` 每月独立抽样 | 真实中催收率受经济环境和借款人行为波动 |
983
+ | **User Growth** | 直接用 CSV 中的 `Monthly_User_Growth` | `Monthly_User_Growth(t) + N(0, σ₂)` | 用户增长有行业噪声,同一经济环境下不同公司有差异 |
984
+ | **Gross Margin** | 直接用 CSV 中的 `Gross_Margin` | `Gross_Margin(t) + N(0, σ₃)` | 信用损失和服务成本有月度波动 |
985
+ | **EBITDA Margin** | 直接用 CSV 中的 `EBITDA_Margin` | `EBITDA_Margin(t) + N(0, σ₄)` | 运营效率有随机波动 |
986
+ | **Fundraising 到账金额** | `Fund_Ask × P_success` (全额或零) | `Fund_Ask × Uniform(0.7, 1.0)` (部分到账) | 现实中很少恰好拿到全额 |
987
+
988
+ > 注意:Lending Rate、Revenue 公式、Cash Formula、三表逻辑**不加噪声**。这些是确定性的"物理定律"。随机性只加在输入参数上,公式本身保持精确。
989
+
990
+ ### D.2 噪声参数 (Noise Parameters)
991
+
992
+ 所有噪声参数集中管理,写入 `config.json → stochastic_config`:
993
+
994
+ ```
995
+ stochastic_config: {
996
+ "enabled": true, -- 开关:false 时退化为完全确定性
997
+ "seed": null, -- 全局种子,null 表示使用 episode_id
998
+ "n_episodes": 1000, -- 每个 agent 的运行次数
999
+
1000
+ "collection_rate_std": 0.04, -- σ₁: Collection Rate 标准差
1001
+ "user_growth_std": 0.5, -- σ₂: Monthly User Growth 标准差 (百分点)
1002
+ "gross_margin_std": 2.0, -- σ₃: Gross Margin 标准差 (百分点)
1003
+ "ebitda_margin_std": 1.5, -- σ₄: EBITDA Margin 标准差 (百分点)
1004
+ "fundraising_fill_range": [0.7, 1.0] -- 到账比例的均匀分布范围
1005
+ }
1006
+ ```
1007
+
1008
+ ### D.3 可比性保证:Common Random Numbers (CRN)
1009
+
1010
+ **核心问题:** 加入随机性后,如何确保 Agent A 和 Agent B 的结果是可比的?
1011
+
1012
+ **方案:种子控制 + 配对比较 (Paired Comparison with CRN)**
1013
+
1014
+ ```
1015
+ 对于 episode i = 1, 2, ..., 1000:
1016
+ seed_i = base_seed + i
1017
+ rng_i = RandomGenerator(seed_i)
1018
+
1019
+ 用 rng_i 预生成该 episode 的所有随机序列:
1020
+ collection_rates[0..T] ← N(0.96, σ₁) per month
1021
+ user_growth_noise[0..T] ← N(0, σ₂) per month
1022
+ gross_margin_noise[0..T] ← N(0, σ₃) per month
1023
+ ebitda_margin_noise[0..T] ← N(0, σ₄) per month
1024
+ fundraising_rolls[0..T] ← Uniform(0, 1) per month (用于判定成功/失败)
1025
+ fundraising_fills[0..T] ← Uniform(0.7, 1.0) per month
1026
+
1027
+ Agent A 和 Agent B 在 episode i 中面对**完全相同**的随机序列
1028
+ 唯一的差异来自 agent 的决策(何时融资、融多少、选 debt 还是 equity)
1029
+ ```
1030
+
1031
+ > **关键:** 随机序列是环境的属性,不是 agent 的属性。同一 episode 中所有 agent 面对相同的"天气",区别只在于他们如何应对。
1032
+
1033
+ **为什么这有效?**
1034
+
1035
+ 1. **消除运气差异:** 如果 Agent A 碰巧遇到高 Collection Rate 的 episode 而 Agent B 没有,比较不公平。CRN 确保两者面对同样的随机环境
1036
+ 2. **降低所需样本量:** 配对比较的方差远小于独立比较。Var(A-B|paired) << Var(A) + Var(B)。1000 次可能就足够,而独立比较可能需要 10000+
1037
+ 3. **可复现:** 给定 seed,任何 episode 都可以精确复现,便于 debug
1038
+
1039
+ ### D.4 评估指标与统计方法
1040
+
1041
+ **每个 episode 产出一个 score:**
1042
+
1043
+ ```
1044
+ Score_i = (TTM_Revenue × Valuation_Multiple) + Cash_Balance if cash never went negative
1045
+ Score_i = 0 if cash went negative at any point
1046
+ ```
1047
+
1048
+ > `Valuation_Multiple` = 10 (from `config.json → environment_config.valuation_multiple`)
1049
+ > TTM = Trailing Twelve Months revenue (sum of last 12 months from `pnl_ledger.revenue`)
1050
+
1051
+ **跨 episode 聚合:**
1052
+
1053
+ | 指标 | 计算 | 用途 |
1054
+ |------|------|------|
1055
+ | Mean Score | `mean(Score_1..Score_N)` | 主要排名指标 |
1056
+ | Survival Rate | `count(Score > 0) / N` | agent 避免现金危机的能力 |
1057
+ | Std Dev | `std(Score_1..Score_N)` | 策略稳定性 |
1058
+ | Median Score | `median(Score_1..Score_N)` | 抗极端值的稳健指标 |
1059
+ | 5th Percentile | `quantile(Score, 0.05)` | 最差情况表现(tail risk) |
1060
+
1061
+ **Agent 间比较:**
1062
+
1063
+ ```
1064
+ 对于每个 episode i:
1065
+ Δ_i = Score_A_i − Score_B_i (配对差值)
1066
+
1067
+ 统计检验:
1068
+ H₀: mean(Δ) = 0 (两个 agent 无差异)
1069
+ H₁: mean(Δ) ≠ 0
1070
+
1071
+ 使用 paired t-test 或 Wilcoxon signed-rank test
1072
+ 报告 p-value 和 95% confidence interval for mean(Δ)
1073
+ ```
1074
+
1075
+ > 因为使用了 CRN,配对差值 Δ_i 的方差很小,即使两个 agent 的平均表现差异不大也能检测出来。
1076
+
1077
+ ### D.5 实验流程
1078
+
1079
+ ```
1080
+ 输入:
1081
+ agents = [Agent_A, Agent_B, Agent_C, ...]
1082
+ N = 1000
1083
+ base_seed = 42
1084
+
1085
+ 流程:
1086
+ for i in 1..N:
1087
+ env_i = generate_environment(seed = base_seed + i)
1088
+ → 预生成所有月份的随机参数
1089
+ → 加载确定性的宏观数据
1090
+
1091
+ for agent in agents:
1092
+ reset agent state
1093
+ score_i[agent] = run_episode(agent, env_i)
1094
+
1095
+ 输出:
1096
+ for each agent:
1097
+ mean, std, median, survival_rate, p5, p95
1098
+
1099
+ for each agent pair (A, B):
1100
+ paired_diff = score[A] − score[B]
1101
+ t_stat, p_value = paired_ttest(paired_diff)
1102
+ → "Agent A is significantly better/worse than Agent B (p < 0.05)"
1103
+ ```
1104
+
1105
+ ---
1106
+
1107
+ ## System Flow Diagram
1108
+
1109
+ ```
1110
+ ──── Every month (automatic) ────
1111
+
1112
+
1113
+ Module A: update both ledgers
1114
+ ┌──────────────────────────────────┐
1115
+ │ 1. Compute Users(t), Revenue(t) │ ← P&L ledger (accrual)
1116
+ │ COGS(t), OpEx(t), etc. │
1117
+ │ │
1118
+ │ 2. Compute cash flows with lags │ ← Cash ledger (bank account)
1119
+ │ Revenue(t-1) → cash in │
1120
+ │ New loans(t) → cash out │
1121
+ │ OpEx(t-1) → cash out │
1122
+ │ │
1123
+ │ 3. Update BS running balances │ ← Loan Portfolio, Allowance,
1124
+ │ Provision(t-4) → write-off │ Receivables, Payables
1125
+ │ (non-cash BS reclassification)│
1126
+ │ │
1127
+ │ 4. Update cash_balance │
1128
+ └──────────────────────────────────┘
1129
+
1130
+
1131
+ Agent decides action at month t
1132
+
1133
+ ├──── action = "book_closing"
1134
+ │ │
1135
+ │ ▼
1136
+ │ Freeze both ledgers [0, t]
1137
+ │ │
1138
+ │ ▼
1139
+ │ Generate 3 statements
1140
+ │ (IS from pnl_ledger,
1141
+ │ BS from both,
1142
+ │ CF from cash_ledger)
1143
+ │ │
1144
+ │ ▼
1145
+ │ Return to agent
1146
+
1147
+ └──── action = "fund_raising_request"
1148
+
1149
+
1150
+ Generate 3 statements (same as above)
1151
+
1152
+
1153
+ Module C: evaluate P_success
1154
+
1155
+ ┌────┴────┐
1156
+ ▼ ▼
1157
+ SUCCESS FAILURE
1158
+ │ │
1159
+ ▼ │
1160
+ Update: │
1161
+ - cash_ledger │
1162
+ - capital_summary│
1163
+ - debt/equity │
1164
+ - cap table │
1165
+ │ │
1166
+ ▼ ▼
1167
+ Return results to agent
1168
+ ```
1169
+
1170
+ ---
1171
+
1172
+ ## Data Dependencies
1173
+
1174
+ | Module | Reads From | Writes To |
1175
+ |--------|-----------|----------|
1176
+ | **A: Tracking** | `data_paths.combined_econ_data` (Tsy2Y, Baa_Yield, Gross_Margin, EBITDA_Margin, **adj_Monthly_User_Growth**) + `company_config` (loan params, lag params) | `pnl_ledger`, `cash_ledger`, `capital_summary`, `debt_instruments`, `equity_rounds` |
1177
+ | **B: Statements** | `pnl_ledger`, `cash_ledger`, `capital_summary`, `debt_instruments`, `equity_rounds` | `financial_snapshots` |
1178
+ | **C: Fundraising** | `data_paths.fundraising_probs` (**adj_P_debt**, **adj_P_equity**) | Results fed into Module A & B |
1179
+ | **D: Stochastic** | `stochastic_config` (noise params, seed, n_episodes) | Pre-generated random sequences per episode |
1180
+
1181
+ ---
1182
+
1183
+ ## Appendix: Accounting Review — Issues Found & Fixed
1184
+
1185
+ 在设计三表配平检查时,发现并修正了以下三个问题:
1186
+
1187
+ ### Issue 1: Write-off 被错误归类为现金流出
1188
+
1189
+ **原始设计:** `Cash_Out_Writeoffs(t) = Credit_Loss_Provision(t-4)` 作为现金流出项出现在 cash_ledger 和现金流量表中。
1190
+
1191
+ **问题:** Write-off 是资产负债表内部的重新分类(Gross ↓, Allowance ↓, Net 不变),不会导致现金离开银行账户。违约对现金的影响已经通过 `Collection_Rate < 100%` 体现——违约借款人停止支付利息和本金,导致 `Cash_In_Interest` 和 `Cash_In_Principal` 减少。将 write-off 同时计入现金流出会造成**重复计算**。
1192
+
1193
+ **修正:** 从 cash_ledger、A.4 现金公式、现金流量表中移除 `Cash_Out_Writeoffs`。Write-off 仅作为资产负债表非现金操作保留在 A.6 的 running balance 逻辑中。
1194
+
1195
+ ### Issue 2: 缺少 Interest Receivable 和 Principal Receivable
1196
+
1197
+ **原始设计:** 资产负债表资产端只有 Cash、Loan Portfolio、Other Assets。
1198
+
1199
+ **问题:** Revenue 在月 t 通过 P&L 确认(accrual),增加 Retained Earnings(Equity ↑),但现金要到 t+1 才到账。如果资产端没有对应的 Receivable,则 Equity 增加了但 Asset 没有同步增加,**A ≠ L + E**。同理,本金还款在 t 月安排但 t+1 到账,Loan Portfolio Gross 已经减少但 Cash 尚未增加,中间需要 Principal Receivable 来桥接。
1200
+
1201
+ **修正:** 在资产负债表中新增 `Interest Receivable = Revenue(t)` 和 `Principal Receivable = Loan_Portfolio_Gross(t) / Avg_Loan_Term`,并在 A.6 中定义其清算逻辑。
1202
+
1203
+ ### Issue 3: Accounts Payable 不完整
1204
+
1205
+ **原始设计:** `Accounts Payable = OpEx(t)` — 仅包含运营费用。
1206
+
1207
+ **问题:** Servicing Costs(COGS 中的非 provision 部分)同样有 1 个月的现金滞后(月 t 确认,t+1 支付)。如果只计入 OpEx 的应付而遗漏 Servicing Costs,则 P&L 确认的 Servicing_Costs 减少了 Equity(通过 RE),但负债端没有对应增加,**L + E 不等式被打破**。
1208
+
1209
+ **修正:** 扩展为 `Accounts_Payable(t) = OpEx(t) + Servicing_Costs(t)`。
enterprise_env_t0/.DS_Store ADDED
Binary file (6.15 kB). View file
 
enterprise_env_t0/t0_board_materials/cap_table.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ | Shareholder | Shares Owned | % Ownership |
2
+ | ------------------ | -------------- | ----------- |
3
+ | Founders | 8,000,000 | 76.2% |
4
+ | Seed Investors | 2,000,000 | 19.0% |
5
+ | ESOP | 500,000 | 4.8% |
6
+ | **Total** | **10,500,000** | **100.0%** |
enterprise_env_t0/t0_board_materials/company_overview.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Company Overview
2
+
3
+ Company XYZ is a consumer-focused financial technology company operating in the digital lending industry, providing credit directly to individual consumers through a technology-enabled platform. The company leverages proprietary data, automated underwriting, and digital distribution channels to originate and manage consumer loans at scale.
4
+
5
+ Business Model
6
+
7
+ Company XYZ extends loans from its own balance sheet, assuming full credit risk and retaining ownership of the loan portfolio. Its lending products are designed to offer consumers fast, convenient access to credit, with loan origination, servicing, and repayment managed entirely through the company's digital infrastructure.
8
+
9
+ The company's primary revenue source is interest income earned on outstanding consumer loan balances. This is complemented by origination, servicing, and other lending-related fees, where applicable. By funding loans on balance sheet, Company XYZ captures the full interest spread while maintaining direct control over pricing, underwriting standards, and customer relationships.
10
+
11
+ As a 2C lender, Company XYZ's performance and growth are driven by loan origination volume, portfolio quality, repayment behavior, and net interest margins. The company focuses on disciplined risk management, data-driven credit decisioning, and scalable operations to grow its consumer loan portfolio while managing credit losses and capital efficiency.
enterprise_env_t0/t0_board_materials/governance_approvals.txt ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Governance & Approvals - Board Meeting Minutes
2
+
3
+ 1. Approval of Prior Meeting Minutes
4
+
5
+ * Minutes from the board meeting in Jan 2xx0 were reviewed and approved as presented.
6
+
7
+ 2. ESOP Pool Creation — Approved
8
+
9
+ * The board approved creation of a 5% ESOP pool (500,000 new shares) to incentivize key hires.
10
+ * Fully diluted ownership after pool: Founders 76%, Seed 19%, ESOP 5%.
11
+ * The board authorized management to grant options from the pool at its discretion.
12
+
13
+ 3. Credit Policy Adoption — Approved
14
+
15
+ * The board approved the early-stage consumer lending policy, covering underwriting criteria, maximum loan size, and risk controls. Loan originations may now proceed.
16
+
17
+ 4. Delegation of Authority — Approved
18
+
19
+ * The board authorized management to approve loan disbursements up to $50,000 without additional board approval.
20
+
21
+ Cap Table (Post-ESOP, effective immediately):
22
+
23
+ | Shareholder | Shares Owned | % Ownership |
24
+ | -------------- | ------------ | ----------- |
25
+ | Founders | 8,000,000 | 76.2% |
26
+ | Seed Investors | 2,000,000 | 19.0% |
27
+ | ESOP | 500,000 | 4.8% |
28
+ | Total | 10,500,000 | 100.0% |
enterprise_env_t0/t0_financials/t0_balance_sheet.xlsx ADDED
Binary file (5.31 kB). View file
 
enterprise_env_t0/t0_financials/t0_cash_flow_statement.xlsx ADDED
Binary file (5.28 kB). View file
 
enterprise_env_t0/t0_financials/t0_income_statement.xlsx ADDED
Binary file (5.26 kB). View file
 
enterprise_env_t0/to_operations_payments/1A_Customer_Support_Services.docx ADDED
Binary file (37.2 kB). View file
 
enterprise_env_t0/to_operations_payments/1B_Fraud_Monitoring_and_Risk_Operations.docx ADDED
Binary file (37.2 kB). View file
 
enterprise_env_t0/to_operations_payments/2A_Software_Development_Services.docx ADDED
Binary file (37.1 kB). View file
 
enterprise_env_t0/to_operations_payments/2B_Infrastructure_and_Hosting_Agreement.docx ADDED
Binary file (37.1 kB). View file
 
enterprise_env_t0/to_operations_payments/3A_Sales_and_Marketing_Services.docx ADDED
Binary file (37.2 kB). View file