import random # 定义基本参数 initial_salary_a = 25000 # 路径 A 初始薪资 initial_salary_b = 14000 # 路径 B 初始薪资 initial_salary_c = 5000 # 路径 C 初始薪资 savings_a = 400000 # 路径 A 初始存款 savings_b = 400000 # 路径 B 初始存款 savings_c = 0 # 路径 C 初始存款 mortgage_c = 600000 # 路径 C 房贷 first_tier_price = 5500000 # 一线城市房价 second_tier_price = 1500000 # 二线城市房价 salary_increase_prob_a = 0.3 # 一线城市薪资增长概率 salary_increase_prob_b = 0.3 # 二线城市薪资增长概率 layoff_prob = 0.1 # 被裁员概率 house_depreciation_prob_c = 0.4 # 老家房子贬值概率 salary_usable_ratio = 0.65 # 薪资中可用于支出的比例 duration = 15 * 12 # 模拟时间(月) # 模拟函数 def simulate_path_with_negatives(path): import random # 基本参数 initial_salary_a = 25000 initial_salary_b = 14000 initial_salary_c = 5000 savings_a = 400000 savings_b = 400000 savings_c = 0 mortgage_c = 600000 first_tier_price = 5500000 second_tier_price = 1500000 duration = 15 * 12 salary_usable_ratio = 0.65 # 事件概率 salary_increase_prob_a = 0.3 salary_increase_prob_b = 0.3 layoff_prob = 0.1 house_depreciation_prob_c = 0.4 # 模拟函数 def simulate_path(path): salary = initial_salary_a if path == 'A' else initial_salary_b if path == 'B' else initial_salary_c savings = savings_a if path == 'A' else savings_b if path == 'B' else savings_c mortgage_remaining = mortgage_c if path == 'C' else 0 progress = 0 married = False house_bought = False car_bought = False for month in range(duration): if path == 'A' and random.random() < salary_increase_prob_a: salary *= 1.1 elif path == 'B' and random.random() < salary_increase_prob_b: salary *= 1.1 if path == 'A' and random.random() < layoff_prob: salary = 0 elif path == 'B' and random.random() < layoff_prob: salary *= 0.5 usable_salary = salary * salary_usable_ratio savings += usable_salary if not car_bought and month >= 60: car_bought = True progress += 10 if not house_bought and (savings >= first_tier_price * 0.35 if path == 'A' else savings >= second_tier_price * 0.35): house_bought = True savings -= first_tier_price * 0.35 if path == 'A' else second_tier_price * 0.35 progress += 30 if not married and (house_bought or path == 'C'): married = True progress += 20 if path == 'C' and random.random() < house_depreciation_prob_c: mortgage_remaining *= (1 - 0.35) if path == 'C' and mortgage_remaining > 0: repayment = min(mortgage_remaining, usable_salary) mortgage_remaining -= repayment savings -= repayment if mortgage_remaining == 0: progress += 20 if salary == 0 and month % 3 == 0: salary = initial_salary_a if path == 'A' else initial_salary_b if path == 'B' else initial_salary_c return progress progress_a = simulate_path('A') progress_b = simulate_path('B') progress_c = simulate_path('C') # a=60% b=60% c=50%
![]() | 1 Eagleyes 2023-11-27 20:13:29 +08:00 ![]() 我选 D 一线赚钱到 30 岁-33 岁。积累存款 100-200 万。 之后你想干嘛干嘛,选 abc 都可以。 记住,在没搞到 100 万之前不要想着享受,要有农民工的心态,农民工知道吧,人家工资基本净落,除了吃饭基本不花钱,做不到就努力压缩成本尽量像他们靠拢就可以了。 你说 25000 ,我默认税前吧,不涨薪的情况下,税后 2 万也差不多,一年 24 万, 咱努努力一年存个 15-20 万,5-7 年即可存到 100 万。 |
![]() | 2 shm7 2023-11-28 14:40:56 +08:00 先看看前几天 500 万武汉买房的。150 万二线可能有点乐观。 |
![]() | 5 Eagleyes 2023-11-29 10:07:49 +08:00 ![]() @inpm #3 点外卖,不会自己做饭啊? 10 块钱素材吃到撑,一个素炒土豆丝,麻婆豆腐卖 15-18 ,自己买菜做才知道成本有多低, 除非 996 我也不说啥了; 打车,就那么懒?来一线享受生活的啊?除非 996 给报销也不说啥了,不然老老实实坐公交地铁去,一个月 200 顶天了,忽略不计; 3C ,无非就是买个手机,相机,游戏机?还年年换新啊?不照照镜子自己有那实力么? 2-3 年换新一次也没多少钱,相机更是耐用品,游戏机游戏虽然贵,一年也玩不了几个,完了之后把光盘卖了继续买新款,没多少钱; |
![]() | 6 djangovcps OP @Eagleyes 刚毕业前三年花钱都大手大脚的,中后期才知道存钱,已经有点晚了 |
![]() | 7 Eagleyes 2023-11-29 10:20:58 +08:00 @djangovcps #6 3 年时间并不晚,以自身经历来看,前三年即使很会过也存不下多少钱, 大概是工作 5-7 年后才能显著增长。 因为前三年初出茅庐,看啥都新鲜,管不住手也是人之常情; 另外就是开始的时候啥都没有,需要置办。基本生活,生存物品买了之后才能开始逐渐消停。 |
8 seeu2ex 2023-11-29 13:36:32 +08:00 你这选项明显是没有外力干涉的情况下,现实还会有外力介入,混沌性太强了,基本不可能如你所愿 |
![]() | 9 djangovcps OP @Eagleyes 薪资到瓶颈了,现在还要考虑裁员问题,头疼得很 |
![]() | 10 djangovcps OP @seeu2ex 可以继续添加随机奖励和惩罚,这是个简单的 demo |
![]() | 11 Eagleyes 2023-11-29 14:39:39 +08:00 @djangovcps #9 听楼主的意思,之前可能太顺了,有点像出道即巅峰。 不太理解赚钱之艰难,花钱也大手大脚。 好在才 3 年,不算晚。我一个同事 35 岁才醒过来,那真是悔之晚矣。 现年近五旬,背井离乡,抛妻弃子的出来打工养家(当年太潇洒了没存下钱来在打工地置业) |