This file is indexed.

/usr/share/doc/maxima-doc/html/maxima_53.html is in maxima-doc 5.32.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January, 10 2014 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Maxima 5.32.1 Manual: 53. finance</title>

<meta name="description" content="Maxima 5.32.1 Manual: 53. finance">
<meta name="keywords" content="Maxima 5.32.1 Manual: 53. finance">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
    color: black;
    background: white; 
    margin-left: 8%;
    margin-right: 13%;
}

h1
{
    margin-left: +8%;
    font-size: 150%;
    font-family: sans-serif
}

h2
{
    font-size: 125%;
    font-family: sans-serif
}

h3
{
    font-size: 100%;
    font-family: sans-serif
}

h2,h3,h4,h5,h6 { margin-left: +4%; }

div.textbox
{
    border: solid;
    border-width: thin;
    /* width: 100%; */
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em
}

div.titlebox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
    background: rgb(200,255,255);
    font-family: sans-serif
}

div.synopsisbox
{
    border: none;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
     background: rgb(255,220,255);
    /*background: rgb(200,255,255); */
    /* font-family: fixed */
}

pre.example
{
    border: 1px solid gray;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 1em;
    padding-right: 1em;
    /* background: rgb(247,242,180); */ /* kind of sandy */
    /* background: rgb(200,255,255); */ /* sky blue */
    background-color: #F1F5F9; /* light blue-gray */
    /* font-family: "Lucida Console", monospace */
}

div.spacerbox
{
    border: none;
    padding-top: 2em;
    padding-bottom: 2em
}

div.image
{
    margin: 0;
    padding: 1em;
    text-align: center;
}

div.categorybox
{
    border: 1px solid gray;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 1em;
    padding-right: 1em;
    background: rgb(247,242,220);
}


-->
</style>

<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="finance"></a>
<a name="SEC263"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_52.html#SEC262" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC264" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_52.html#SEC261" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_54.html#SEC266" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 53. finance </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC264">53.1 Introduction to finance</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC265">53.2 Functions and Variables for finance</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<p><a name="Item_003a-Introduction-to-finance"></a>
</p><hr size="6">
<a name="Introduction-to-finance"></a>
<a name="SEC264"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC263" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC265" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC263" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC263" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_54.html#SEC266" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 53.1 Introduction to finance </h2>

<p>This is the Finance Package (Ver 0.1).
</p>
<p>In all the functions, <var>rate</var> is the compound interest
rate, <var>num</var> is the number of periods and must be
positive and <var>flow</var> refers to cash flow so if you
have an Output the flow is negative and positive
for Inputs.
</p>
<p>Note that before using the functions defined in this 
package, you have to load it writing <code>load(finance)$</code>.
</p>
<p>Author: Nicolas Guarin Zapata.
</p>
<p><a name="Item_003a-Functions-and-Variables-for-finance"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-finance"></a>
<a name="SEC265"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC264" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_54.html#SEC266" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC263" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC263" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_54.html#SEC266" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 53.2 Functions and Variables for finance </h2>


<p><a name="Item_003a-days360"></a>
</p><dl>
<dt><u>Function:</u> <b>days360</b><i> (<var>year1</var>,<var>month1</var>,<var>day1</var>,<var>year2</var>,<var>month2</var>,<var>day2</var>)</i>
<a name="IDX2218"></a>
</dt>
<dd><p>Calculates the distance between 2 dates, assuming 360 days years, 30 days months.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) days360(2008,12,16,2007,3,25);
(%o2)                      - 621
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-fv"></a>
</p><dl>
<dt><u>Function:</u> <b>fv</b><i> (<var>rate</var>,<var>PV</var>,<var>num</var>)</i>
<a name="IDX2219"></a>
</dt>
<dd><p>We can calculate the future value of a Present one given a certain interest rate.
<var>rate</var> is the interest rate, <var>PV</var> is the present value and <var>num</var> is
the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) fv(0.12,1000,3);
(%o2)                     1404.928
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-pv"></a>
</p><dl>
<dt><u>Function:</u> <b>pv</b><i> (<var>rate</var>,<var>FV</var>,<var>num</var>)</i>
<a name="IDX2220"></a>
</dt>
<dd><p>We can calculate the present value of a Future one given a certain interest rate.
<var>rate</var> is the interest rate, <var>FV</var> is the future value and <var>num</var> is
the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) pv(0.12,1000,3);
(%o2)                711.7802478134108
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-graph_005fflow"></a>
</p><dl>
<dt><u>Function:</u> <b>graph_flow</b><i> (<var>val</var>)</i>
<a name="IDX2221"></a>
</dt>
<dd><p>Plots the money flow in a time line, the positive values are in blue
and upside; the negative ones are in red and downside.
The direction of the flow is given by the sign of the value.
<var>val</var> is a list of flow values.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) graph_flow([-5000,-3000,800,1300,1500,2000])$
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-annuity_005fpv"></a>
</p><dl>
<dt><u>Function:</u> <b>annuity_pv</b><i> (<var>rate</var>,<var>PV</var>,<var>num</var>)</i>
<a name="IDX2222"></a>
</dt>
<dd><p>We can calculate the annuity knowing the present value (like an amount),
it is a constant and periodic payment. <var>rate</var> is the interest rate,
<var>PV</var> is the present value and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) annuity_pv(0.12,5000,10);
(%o2)                884.9208207992202
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-annuity_005ffv"></a>
</p><dl>
<dt><u>Function:</u> <b>annuity_fv</b><i> (<var>rate</var>,<var>FV</var>,<var>num</var>)</i>
<a name="IDX2223"></a>
</dt>
<dd><p>We can calculate the annuity knowing the desired value (future value),
it is a constant and periodic payment. <var>rate</var> is the interest rate,
<var>FV</var> is the future value and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) annuity_fv(0.12,65000,10);
(%o2)                3703.970670389863
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-geo_005fannuity_005fpv"></a>
</p><dl>
<dt><u>Function:</u> <b>geo_annuity_pv</b><i> (<var>rate</var>,<var>growing_rate</var>,<var>PV</var>,<var>num</var>)</i>
<a name="IDX2224"></a>
</dt>
<dd><p>We can calculate the annuity knowing the present value (like an amount),
in a growing periodic payment. <var>rate</var> is the interest rate, <var>growing_rate</var>
is the growing rate, <var>PV</var> is the present value and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) geo_annuity_pv(0.14,0.05,5000,10);
(%o2)                802.6888176505123
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-geo_005fannuity_005ffv"></a>
</p><dl>
<dt><u>Function:</u> <b>geo_annuity_fv</b><i> (<var>rate</var>,<var>growing_rate</var>,<var>FV</var>,<var>num</var>)</i>
<a name="IDX2225"></a>
</dt>
<dd><p>We can calculate the annuity knowing the desired value (future value),
in a growing periodic payment. <var>rate</var> is the interest rate, <var>growing_rate</var>
is the growing rate, <var>FV</var> is the future value and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) geo_annuity_fv(0.14,0.05,5000,10);
(%o2)                216.5203395312695
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>

<p><a name="Item_003a-amortization"></a>
</p><dl>
<dt><u>Function:</u> <b>amortization</b><i> (<var>rate</var>,<var>amount</var>,<var>num</var>)</i>
<a name="IDX2226"></a>
</dt>
<dd><p>Amortization table determined by a specific rate.
<var>rate</var> is the interest rate, <var>amount</var> is the amount value,
and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) amortization(0.05,56000,12)$
      &quot;n&quot;    &quot;Balance&quot;     &quot;Interest&quot;   &quot;Amortization&quot;  &quot;Payment&quot;      
     0.000     56000.000         0.000         0.000         0.000  
     1.000     52481.777      2800.000      3518.223      6318.223  
     2.000     48787.643      2624.089      3694.134      6318.223  
     3.000     44908.802      2439.382      3878.841      6318.223  
     4.000     40836.019      2245.440      4072.783      6318.223  
     5.000     36559.597      2041.801      4276.422      6318.223  
     6.000     32069.354      1827.980      4490.243      6318.223  
     7.000     27354.599      1603.468      4714.755      6318.223  
     8.000     22404.106      1367.730      4950.493      6318.223  
     9.000     17206.088      1120.205      5198.018      6318.223  
    10.000     11748.170       860.304      5457.919      6318.223  
    11.000      6017.355       587.408      5730.814      6318.223  
    12.000         0.000       300.868      6017.355      6318.223
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-arit_005famortization"></a>
</p><dl>
<dt><u>Function:</u> <b>arit_amortization</b><i> (<var>rate</var>,<var>increment</var>,<var>amount</var>,<var>num</var>)</i>
<a name="IDX2227"></a>
</dt>
<dd><p>The amortization table determined by a specific rate and with growing payment
can be claculated by <code>arit_amortization</code>.
Notice that the payment is not constant, it presents
an arithmetic growing, increment is then the difference between two
consecutive rows in the &quot;Payment&quot; column.
<var>rate</var> is the interest rate, <var>increment</var> is the increment, <var>amount</var>
is the amount value, and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) arit_amortization(0.05,1000,56000,12)$
      &quot;n&quot;    &quot;Balance&quot;     &quot;Interest&quot;   &quot;Amortization&quot;  &quot;Payment&quot;      
     0.000     56000.000         0.000         0.000         0.000  
     1.000     57403.679      2800.000     -1403.679      1396.321  
     2.000     57877.541      2870.184      -473.863      2396.321  
     3.000     57375.097      2893.877       502.444      3396.321  
     4.000     55847.530      2868.755      1527.567      4396.321  
     5.000     53243.586      2792.377      2603.945      5396.321  
     6.000     49509.443      2662.179      3734.142      6396.321  
     7.000     44588.594      2475.472      4920.849      7396.321  
     8.000     38421.703      2229.430      6166.892      8396.321  
     9.000     30946.466      1921.085      7475.236      9396.321  
    10.000     22097.468      1547.323      8848.998     10396.321  
    11.000     11806.020      1104.873     10291.448     11396.321  
    12.000        -0.000       590.301     11806.020     12396.321
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-geo_005famortization"></a>
</p><dl>
<dt><u>Function:</u> <b>geo_amortization</b><i> (<var>rate</var>,<var>growing_rate</var>,<var>amount</var>,<var>num</var>)</i>
<a name="IDX2228"></a>
</dt>
<dd><p>The amortization table determined by rate, amount,
and number of periods can be found by <code>geo_amortization</code>.
Notice that the payment is not constant, it presents
a geometric growing, <var>growing_rate</var> is then the quotient between two
consecutive rows in the &quot;Payment&quot; column.
<var>rate</var> is the interest rate, <var>amount</var>
is the amount value, and <var>num</var> is the number of periods.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) geo_amortization(0.05,0.03,56000,12)$
      &quot;n&quot;    &quot;Balance&quot;     &quot;Interest&quot;   &quot;Amortization&quot;  &quot;Payment&quot;      
     0.000     56000.000         0.000         0.000         0.000  
     1.000     53365.296      2800.000      2634.704      5434.704  
     2.000     50435.816      2668.265      2929.480      5597.745  
     3.000     47191.930      2521.791      3243.886      5765.677  
     4.000     43612.879      2359.596      3579.051      5938.648  
     5.000     39676.716      2180.644      3936.163      6116.807  
     6.000     35360.240      1983.836      4316.475      6300.311  
     7.000     30638.932      1768.012      4721.309      6489.321  
     8.000     25486.878      1531.947      5152.054      6684.000  
     9.000     19876.702      1274.344      5610.176      6884.520  
    10.000     13779.481       993.835      6097.221      7091.056  
    11.000      7164.668       688.974      6614.813      7303.787  
    12.000         0.000       358.233      7164.668      7522.901
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-saving"></a>
</p><dl>
<dt><u>Function:</u> <b>saving</b><i> (<var>rate</var>,<var>amount</var>,<var>num</var>)</i>
<a name="IDX2229"></a>
</dt>
<dd><p>The table that represents the values in a constant and periodic
saving can be found by <code>saving</code>.
<var>amount</var> represents the desired quantity and num the number
of periods to save.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) saving(0.15,12000,15)$
      &quot;n&quot;    &quot;Balance&quot;     &quot;Interest&quot;   &quot;Payment&quot;      
     0.000         0.000         0.000         0.000  
     1.000       252.205         0.000       252.205  
     2.000       542.240        37.831       252.205  
     3.000       875.781        81.336       252.205  
     4.000      1259.352       131.367       252.205  
     5.000      1700.460       188.903       252.205  
     6.000      2207.733       255.069       252.205  
     7.000      2791.098       331.160       252.205  
     8.000      3461.967       418.665       252.205  
     9.000      4233.467       519.295       252.205  
    10.000      5120.692       635.020       252.205  
    11.000      6141.000       768.104       252.205  
    12.000      7314.355       921.150       252.205  
    13.000      8663.713      1097.153       252.205  
    14.000     10215.474      1299.557       252.205  
    15.000     12000.000      1532.321       252.205
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-npv"></a>
</p><dl>
<dt><u>Function:</u> <b>npv</b><i> (<var>rate</var>,<var>val</var>)</i>
<a name="IDX2230"></a>
</dt>
<dd><p>Calculates the present value of a value series to evaluate the viability in a
project.
<var>val</var> is a list of varying cash flows.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) npv(0.25,[100,500,323,124,300]);
(%o2)                714.4703999999999
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-irr"></a>
</p><dl>
<dt><u>Function:</u> <b>irr</b><i> (<var>val</var>,<var>IO</var>)</i>
<a name="IDX2231"></a>
</dt>
<dd><p>IRR (Internal Rate of Return) is the value of rate which makes Net Present Value
zero.
<var>flowValues</var> is a list of varying cash flows,
<var>I0</var> is the initial investment.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) res:irr([-5000,0,800,1300,1500,2000],0)$
(%i3) rhs(res[1][1]);
(%o3)                .03009250374237132
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-benefit_005fcost"></a>
</p><dl>
<dt><u>Function:</u> <b>benefit_cost</b><i> (<var>rate</var>,<var>input</var>,<var>output</var>)</i>
<a name="IDX2232"></a>
</dt>
<dd><p>Calculates the ratio Benefit/Cost. Benefit is the Net Present Value (NPV)
of the inputs, and Cost is the Net Present Value (NPV) of the outputs.
Notice that if there is not an input or output value in a specific period,
the input/output would be a zero for that period.
<var>rate</var> is the interest rate, <var>input</var> is a list of input values,
and <var>output</var> is a list of output values.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(finance)$
(%i2) benefit_cost(0.24,[0,300,500,150],[100,320,0,180]);
(%o2)               1.427249324905784
</pre>
<div class=categorybox>
&middot;
<p>@ref{Category: Package finance}
</div>
</p>
</dd></dl>


<p><a name="Item_003a-fractals"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC263" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_54.html#SEC266" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>root</em> on <em>January, 10 2014</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>