[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 3 KB, 125x121, 1386730461576.jpg [View same] [iqdb] [saucenao] [google]
6216980 No.6216980 [Reply] [Original]

Anyone have the program 'Stella' (for those wondering its a program used to model 'systems' using variables. Essentially you can model anything in it with the proper inputs/understanding.

I'm working on a financial model, and have a basic exponential curve representing a compounding portfolio over time.

I'm trying to figure out how to represent a 'stock market crash' reducing the current value of the portfolio at year 15 by 40% (modeled from year 0-40). I'm not sure which function to use/how to incorporate this given my current model.

Essentially I want the curve to look like thos
> Year 0-14 exponential curve, portfolio is compounding
> at year 15 a stock market crash is simulated ) 40% decrease in value from the current value on the exponential curve).
> Year 16-40 the stock market continues to compound at the same rate as previous.
> the model overview is: Exponential increase, market crash, continuing exponential increase.

I know it' a longshot, but basically I'm seeking someone with knowledge/experience with the Stella program.

Thanks! Will monitor thread.

Not sure if I'd have better luck here or on /g/.

>> No.6216983

Hmm, maybe model it as a linear low pass filter?

>> No.6216995
File: 23 KB, 534x218, 1386730887673.png [View same] [iqdb] [saucenao] [google]
6216995

>>6216983

elaborate if you can.

Here is my actual visual stella model. will post graph next.

Unfortunately if you aren't too familiar with the Stella functions/program It may be tough to help even with adequate mathematical knowledge.

I really appreciate all help though.

>> No.6217035
File: 216 KB, 1680x1050, 1386731518114.png [View same] [iqdb] [saucenao] [google]
6217035

>>6216983
>>6216995

Here is my graphical representation of that model.

For those wondering the marked values are when you will make a million dollars (in years) investing in a market compounding at 8% a year over 40 years.

investing the following amounts annually
> $6,000
> $10,000
> $25,000

Essentially I want to represent a 40% crash at year 15 to represent a stock market crash. After the crash the exponential function will increase as it did previously.

>> No.6217072

>>6217035
Use a step function.

Also Stella / Ithink / Vensim are of limited usefulness. Your problem is best solved mathematically.

>> No.6217085

>>6217035
how about
f(t) = {Pe^(rt) for year 0-15, .4Pe^(rt) for year > 15}

>> No.6217093
File: 119 KB, 1680x1050, 1386732703104.png [View same] [iqdb] [saucenao] [google]
6217093

>>6217072

I just need to successfully model the equation. The step function would go inside my main stock (portfolio value)

Do you have any idea what it would look like/how I would actually do it.? I've been toying around and still no luck.

I'll post a s/s of the actual input/formula.

>>6217085

Not sure how to implement that properly into my model.

See my s/s; see if you could figure out what I'd need to do.

I have my portfolio stock selected, this is what the 40% decrease will need to effect.

>> No.6217133
File: 71 KB, 600x600, 1386733551331.jpg [View same] [iqdb] [saucenao] [google]
6217133

>>6217093

Still can't figure it out. With what I have in that s/s it has no effect on the trend/data in the table.

>>6217072

I feel like you have the greatest potential thus far to be able to help me.

Based on my image >>6217093

Do you have any idea what I would actually plug into the stock?

>> No.6217132

>>6217093
You only change the rate equations. If stella operates fine in discrete time, you should add a (Kronecker Delta (Year-15))*PortfolioValue*0.6

obviously you need to figure out what function name the kronecker delta has in Stella

>> No.6217137

>>6217132
Sorry, you should subtract (Kronecker Delta (Year-15))*PortfolioValue*0.4 from your rate

>> No.6217152
File: 109 KB, 445x304, 1386734085371.jpg [View same] [iqdb] [saucenao] [google]
6217152

>>6217132
>>6217137

Since the function doesn't exist within the program, it won't help me with my model.

I appreciate the insight though.

I'm fairly sure it's a step function as

>>6217072
indicated.

This is so frustrating, It's simply my illiteracy with the program that is limiting me here. Theres no clear resources explaining how to do specifically what I need either,

Thanks so far guys. Keep the ideas coming.

Seeking more people experienced in Stella.

>> No.6217190
File: 124 KB, 1680x1050, 1386734557176.png [View same] [iqdb] [saucenao] [google]
6217190

>>6217072

Here I tried again;

Nothing.

Should I be applying it to the stock differently (I'm doing it directly inside the stock).

Pic related.

>> No.6217199

>>6217152
I'm the same. NEVER fuck with stock equations, only with flows.

Try this on for size:

Annual Return on Portfolio ='your original equation here' + IF(TIME=15) THEN (-0.4)*(Portfolio Value) ELSE 0

>> No.6217238
File: 15 KB, 250x202, 1386735494104.jpg [View same] [iqdb] [saucenao] [google]
6217238

>>6217199

My starting stock value is 0, so I just need the formula for reduction at 15 years time (as far as I know). I'll try this


Where/how exactly would I implement this. I tried adding a connector/converter with the formula, no effect. Tried to plug it into the stock, and I can't include the portfolio value as a variable within the portfolio variable stock.

I'll try a few more ways with it and see. Would love to have you elaborate/be more specific about how to apply that equation.

TYVM !

>> No.6217256
File: 80 KB, 790x639, 1386735892506.jpg [View same] [iqdb] [saucenao] [google]
6217256

>>6217199

I see, I'm trying to apply it to my annual return on portfolio tab.

The syntax doesn't hold so I'll see if I can vary it around a bit.

If anyone her ehas stella and wouldn't mind helping me out contact me @ jpisme3 on aim. Perhaps I could send you my file and you try to achieve the desired effect?

>> No.6217290

>>6217199

Alright now were getting somewhere.

Here is a pic of my current model, the table, and the stella model.

For some reason it isn't subtracting the 40%, any idea what I'm doing wrong.

Instead of subtracting the proper amount it simply is adding it or neglecting to subtract it.

the - market crash

'market crash' was your equation.

I'm really close now. /sci/'s collective ingenuity is showing! :)

>> No.6217304
File: 141 KB, 1680x1050, 1386736836401.png [View same] [iqdb] [saucenao] [google]
6217304

>>6217256
>>6217199

Forgot the image.. here it is.

I think the issue is the market crash is only being subtracted for that year due to 'Else 0'

unfortunately that equation won't hold syntax without the 'Else 0'

hmm

>> No.6217371
File: 135 KB, 1680x1050, 1386738460258.png [View same] [iqdb] [saucenao] [google]
6217371

>>6217199

Figured out how to apply your variable. Woot. TY!

Had to make an outflow. Took a lot of trial/error but I finally got it.

My graph shows that over the long term even a large correction in the market won't really damage long term gains.

a 40% reduction in portfolio value isn't as big as I thought in the long term.

Thank you so much for helping guys.

I respect /sci/. Thanks fellas.