{"id":1103,"date":"2013-02-02T18:20:26","date_gmt":"2013-02-02T10:20:26","guid":{"rendered":"http:\/\/www.nargalzius.com\/blog\/?p=1103"},"modified":"2013-02-02T18:20:26","modified_gmt":"2013-02-02T10:20:26","slug":"financial-extrapolater-v1-2","status":"publish","type":"post","link":"http:\/\/nargalzius.com\/blog\/archives\/2013\/02\/02\/financial-extrapolater-v1-2","title":{"rendered":"Financial Extrapolator v1.2"},"content":{"rendered":"<p>I&#8217;ve updated my homemade <a href=\"http:\/\/nargalzius.com\/downloads\/expenses\">extrapolator<\/a><\/p>\n<p>The purpose is still the same, so you can read all about what it&#8217;s used for <a href=\"http:\/\/www.nargalzius.com\/blog\/archives\/2012\/09\/08\/financial-extrapolator\">from past post<\/a><\/p>\n<p>I&#8217;ve updated two things: First is I&#8217;ve put in a <code>config.xml<\/code> so people could assign different dynamic values that the application uses. Second, and more importantly, is that I&#8217;ve revised the syntax of the expenses xml file. <span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_1');\" onkeypress=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_1');\" ><sup id=\"footnote_plugin_tooltip_1103_1_1\" class=\"footnote_plugin_tooltip_text\">1 <\/sup><\/a><span id=\"footnote_plugin_tooltip_text_1103_1_1\" class=\"footnote_tooltip\">Notice I didn&#8217;t list that as a filename anymore &#8211; since the config.xml file will allow people to change it<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_1103_1_1').tooltip({ tip: '#footnote_plugin_tooltip_text_1103_1_1', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script> I&#8217;ll be talking about the two changes in detail below.<!--more--><!-- \/\/ --><\/p>\n<h1>Configuration file<\/h1>\n<p>The <code>config.xml<\/code> file is pretty simple, here&#8217;s what it looks like:<\/p>\n<pre><code>&lt;xml&gt;\n    &lt;expenseURL debug=\"false\"&gt;expenses.xml&lt;\/expenseURL&gt;\n    &lt;headers&gt;\n        &lt;name&gt;account&lt;\/name&gt;\n        &lt;low&gt;lowest&lt;\/low&gt;\n        &lt;high&gt;highest&lt;\/high&gt;\n        &lt;min&gt;minimum&lt;\/min&gt;\n        &lt;extra&gt;surplus&lt;\/extra&gt;\n\n        &lt;start&gt;&lt;![CDATA[&lt;br&gt;BEGINNING&lt;br&gt;BALANCE]]&gt;&lt;\/start&gt;\n        &lt;end&gt;&lt;![CDATA[&lt;br&gt;ENDING&lt;br&gt;BALANCE]]&gt;&lt;\/end&gt;\n        &lt;allotment&gt;&lt;![CDATA[&lt;br&gt;MINIMUM&lt;br&gt;ALLOTMENT]]&gt;&lt;\/allotment&gt;\n     &lt;\/headers&gt;\n&lt;\/xml&gt;<\/code><\/pre>\n<p>The <code>expenseURL<\/code> tag is now a path to any file you choose which contains your actual expense data. <\/p>\n<p>The <code>debug<\/code> attribute is just for demo purposes. The app is designed to <em>always<\/em> display starting from the current month you&#8217;re in &#8211; which is bad news if if you try to view the demo application 5 years from now. If you set <code>debug<\/code> to <strong>true<\/strong> however, you lock the starting day to January 2012. Like I said, it&#8217;s for demo purposes.<\/p>\n<p>Everything in the <code>headers<\/code> tag are exactly that: headers. So if you fancy using different terms for the headers (e.g. if you want to use the word &#8220;disposable&#8221; in place of &#8220;surplus&#8221;) then you can change it here.<\/p>\n<h1>Smarter Handling of Syntax<\/h1>\n<p>It&#8217;s very similar to the old syntax as far as the basic values go.<\/p>\n<pre><code>&lt;account name=\"ACCOUNT_NAME\" balance=\"X\" minimum=\"X\"&gt;\n    &lt;expense start=\"MM\/YYYY\" end=\"MM\/YYYY\" price=\"X\" period=\"X\"&gt;EXPENSE_NAME&lt;\/expense&gt;\n&lt;\/account&gt;<\/code><\/pre>\n<p>Take note that <code>current<\/code> has been changed to <code>balance<\/code> on the parent node (account) The difference is that now it&#8217;s much smarter in interpreting the calculations based on what attributes are present\/absent.<\/p>\n<p>There are about 10 valid permutations which I&#8217;ll discuss one by one. I&#8217;ve also added an EXAMPLE 07 to show how they are plotted out in the <a href=\"http:\/\/nargalzius.com\/downloads\/expenses\">application.<\/a><\/p>\n<h3>Monthly<\/h3>\n<p>An expense in it&#8217;s very basic and functional form would be:<\/p>\n<pre><code>&lt;expense price=\"X\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>This works, and is the first permutation. It assumes the entry to be a monthly occurrence which has no start nor end  &#8211; which is fine because that&#8217;s how monthly payments work.<\/p>\n<h3>Monthly with start date<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>If you add a <code>start<\/code> attribute, this allows for a planned recurring expense which continues on forever &#8211; like getting a new plan for your phone in 3 months.<\/p>\n<h3>Monthly with end date<\/h3>\n<pre><code>&lt;expense price=\"X\" end=\"MM\/YYYY\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>Similar to the previous permutation, this assumes an recurring expense you&#8217;re currently engaged in which you intend to terminate in the future. So this is useful for car\/housing loans that have already started, etc.<\/p>\n<h3>Monthly with start and end<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" end=\"MM\/YYYY\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>It&#8217;s basically a combination of the two previous permutations. So it&#8217;s essentially a <code>ranged<\/code> expense that starts at a particular time and likewise, ends at a certain time. I&#8217;m sure you can imagine what this can be useful for.<\/p>\n<h3>Periodic<\/h3>\n<p>All previous examples have the <code>price<\/code> set to your actual monthly &#8220;fee&#8221;, and assumes you pay every month. But what if you want to pay every X months? Then you use the <code>period<\/code> attribute<\/p>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" period=\"5\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>Take note that any periodic type of payment <strong>requires<\/strong> a <code>start<\/code> date. Because common sense tells us that you need to know what to base the interval with. <span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_2');\" onkeypress=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_2');\" ><sup id=\"footnote_plugin_tooltip_1103_1_2\" class=\"footnote_plugin_tooltip_text\">2 <\/sup><\/a><span id=\"footnote_plugin_tooltip_text_1103_1_2\" class=\"footnote_tooltip\">You can&#8217;t just say &#8220;every 5 months&#8221; &#8211; 5 months starting which month? That&#8217;s automatically 12 possibilities.<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_1103_1_2').tooltip({ tip: '#footnote_plugin_tooltip_text_1103_1_2', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script><\/p>\n<p>Apart from that, this behaves like the 3rd example, where it has a start, but never ends. The only difference is it does it on an interval of months instead of every month.<\/p>\n<p>Incidentally, you can set the <code>period<\/code> to 1 and it&#8217;ll behave <em>exactly<\/em> like the 2nd example. \ud83d\ude42<\/p>\n<h3>Periodic with end date<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" end=\"MM\/YYYY\" period=\"5\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>Again, just like the previous example, but now with a termination date.<\/p>\n<h3>Periodic deferred<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" period=\"12\" deferred=\"true\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>The <code>deferred<\/code> attribute is basically sort of a &#8220;savings&#8221; flag. Meaning the &#8220;expense&#8221; is expected at the <em>end<\/em> of each period. Obviously, this means you don&#8217;t need to &#8220;pay&#8221; anything (yet) when the allotment is started. Hence the &#8220;savings&#8221; analogy <span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_3');\" onkeypress=\"footnote_moveToReference_1103_1('footnote_plugin_reference_1103_1_3');\" ><sup id=\"footnote_plugin_tooltip_1103_1_3\" class=\"footnote_plugin_tooltip_text\">3 <\/sup><\/a><span id=\"footnote_plugin_tooltip_text_1103_1_3\" class=\"footnote_tooltip\">Which probably isn&#8217;t even an analogy come to think of it<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_1103_1_3').tooltip({ tip: '#footnote_plugin_tooltip_text_1103_1_3', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script><\/p>\n<p>This is particularly useful if you want to &#8220;ease into&#8221; a major recurring investment &#8211; such as an insurance premium. If the premium is 30k and you plan to get it a year from now. If you set it to start now (but on a &#8220;deferred&#8221; mode) then the app will include a monthly allotment for the premium. Then come the time next year you need to pay that 30k you&#8217;ll be ready \ud83d\ude42<\/p>\n<h3>Periodic deferred with end<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" end=\"MM\/YYYY\" period=\"5\" deferred=\"true\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>Certainly you should notice the pattern by now. This is similar to &#8220;Periodic with end date&#8221; &#8211; but on a &#8220;deferred&#8221; mode \ud83d\ude09<\/p>\n<h3>Savings<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"MM\/YYYY\" end=\"MM\/YYYY\" deferred=\"true\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>Notice how the syntax works for this particular expense. <code>deferred<\/code> is set to true, and there&#8217;s no <code>period<\/code> attribute.<\/p>\n<p>So what happens basically is if the app sees this particular combination, it&#8217;ll calculate dynamically how many months there are between the start and end date, and use that as for the period value. So if you set it say from Jan 2013 to April 2015 that&#8217;s approximately 28 months. And the price will be divided by 28 as your monthly allotment.<\/p>\n<p>Then the <code>deferred<\/code> attribute basically says that you pay it at the end instead of the start.<\/p>\n<p>In effect, you literally get a savings breakdown, telling you how much you need to put it from the time you start &#8220;saving&#8221; till when you actually pay for the thing you&#8217;re saving for.<\/p>\n<p>Likewise, you can accomplish the same thing by using the <em>periodic deferred with end<\/em> syntax &#8211; provided you know (and input) how many months you&#8217;ll be saving for. This is obviously an easier way of doing that same thing \ud83d\ude42<\/p>\n<h3>One-time<\/h3>\n<pre><code>&lt;expense price=\"X\" start=\"SAME_MM\/YYYY\" end=\"SAME_MM\/YYYY\"&gt;EXPENSE_NAME&lt;\/expense&gt;<\/code><\/pre>\n<p>While not particularly useful as far as the purpose of the application goes, in case you just want to plot in some single-time expenses for whatever reason, you can certainly do so by just setting the start and end to the same date.<\/p>\n<h1>Conclusion \/ Download<\/h1>\n<p>So there you have it, a [hopefully] easier way to use the Financial Extrapolator<\/p>\n<p>Download the <a href=\"http:\/\/www.nargalzius.com\/f\/p\/download.php?file=http:\/\/www.nargalzius.com\/downloads\/expenses\/extrapolator_mac.zip\">mac<\/a> or <a href=\"http:\/\/www.nargalzius.com\/f\/p\/download.php?file=http:\/\/www.nargalzius.com\/downloads\/expenses\/extrapolator_win.zip\">windows<\/a> application (built with Flash)<\/p><div class=\"speaker-mute footnotes_reference_container\"> <div class=\"footnote_container_prepare\"><p><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_label pointer\" onclick=\"footnote_expand_collapse_reference_container_1103_1();\">Notes<\/span><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_collapse_button\" style=\"display: none;\" onclick=\"footnote_expand_collapse_reference_container_1103_1();\">[<a id=\"footnote_reference_container_collapse_button_1103_1\">+<\/a>]<\/span><\/p><\/div> <div id=\"footnote_references_container_1103_1\" style=\"\"><table class=\"footnotes_table footnote-reference-container\"><caption class=\"accessibility\">Notes<\/caption> <tbody> \r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_1103_1('footnote_plugin_tooltip_1103_1_1');\"><a id=\"footnote_plugin_reference_1103_1_1\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8673;<\/span>1<\/a><\/th> <td class=\"footnote_plugin_text\">Notice I didn&#8217;t list that as a filename anymore &#8211; since the config.xml file will allow people to change it<\/td><\/tr>\r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_1103_1('footnote_plugin_tooltip_1103_1_2');\"><a id=\"footnote_plugin_reference_1103_1_2\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8673;<\/span>2<\/a><\/th> <td class=\"footnote_plugin_text\">You can&#8217;t just say &#8220;every 5 months&#8221; &#8211; 5 months starting which month? That&#8217;s automatically 12 possibilities.<\/td><\/tr>\r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_1103_1('footnote_plugin_tooltip_1103_1_3');\"><a id=\"footnote_plugin_reference_1103_1_3\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8673;<\/span>3<\/a><\/th> <td class=\"footnote_plugin_text\">Which probably isn&#8217;t even an analogy come to think of it<\/td><\/tr>\r\n\r\n <\/tbody> <\/table> <\/div><\/div><script type=\"text\/javascript\"> function footnote_expand_reference_container_1103_1() { jQuery('#footnote_references_container_1103_1').show(); jQuery('#footnote_reference_container_collapse_button_1103_1').text('\u2212'); } function footnote_collapse_reference_container_1103_1() { jQuery('#footnote_references_container_1103_1').hide(); jQuery('#footnote_reference_container_collapse_button_1103_1').text('+'); } function footnote_expand_collapse_reference_container_1103_1() { if (jQuery('#footnote_references_container_1103_1').is(':hidden')) { footnote_expand_reference_container_1103_1(); } else { footnote_collapse_reference_container_1103_1(); } } function footnote_moveToReference_1103_1(p_str_TargetID) { footnote_expand_reference_container_1103_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } } function footnote_moveToAnchor_1103_1(p_str_TargetID) { footnote_expand_reference_container_1103_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } }<\/script>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve updated my homemade extrapolator The purpose is still the same, so you can read all about what it&#8217;s used for from past post I&#8217;ve updated two things: First is I&#8217;ve put in a config.xml so people could assign different dynamic values that the application uses. Second, and more importantly, is that I&#8217;ve revised the &hellip; <p class=\"link-more\"><a href=\"http:\/\/nargalzius.com\/blog\/archives\/2013\/02\/02\/financial-extrapolater-v1-2\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Financial Extrapolator v1.2&#8221;<\/span><\/a><\/p><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[9],"tags":[810],"class_list":["post-1103","post","type-post","status-publish","format-standard","hentry","category-nargalzius","tag-nargalzius"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/1103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/comments?post=1103"}],"version-history":[{"count":0,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/1103\/revisions"}],"wp:attachment":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/media?parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/categories?post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/tags?post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}