money networks manage your money with synchronous-reactive money networks. by adam cataldo
Post on 20-Dec-2015
220 views
TRANSCRIPT
Money Networks
Manage your money with synchronous-reactive money networks.
By Adam Cataldo
Outline
I. Discrete-Event Money Models
II. Synchronous Reactive Money Networks
III. Two-Way Functions
IV. Money Network Properties
V. N-Way Functions
Discrete-Event Money Models
Transactions happen at discrete points in time, but time, as we know it, is not discretized.
This discrete event model describes this behavior.
This model is accurate but awkward to work with.
DE Savings Account
Present/Future Value problems
An account opened today with $m has present value (PV) $m.
If it is compounded annually at interest rate i, after t years, the account is worth PV(1+i)^t.
I call this amount the future value (FV) after t years.
PV/FV function Given an interest rate i and a time t, I
can calculate PV from FV or FV from PV as follows:
(1 )tFV PV i
(1 )tFV
PVi
PV/FV function in SR domain
Given the present value, the PV/FV function returns the future value.
Given the future value, the function returns the present value.
For an initial investment of PV left to mature, we use:
f(PV) = PV * (1 + i) ^ t g(FV) = FV / (1 + i)^t
Specifically
( , ) ( , )
( , ) ( , ( ))
( , ) ( ( ), )
( , ) ( , )
F
F PV PV f PV
F FV g FV FV
F PV FV PV FV
In Ptolemy II
In Ptolemy II
In Ptolemy II
PV
In Ptolemy II
PV FV
Calculating PV from FV
Two-Way Function The two-way function is a
generalization of the PV/FV function in the SR domain.
The function has two inputs x and y. Either y = f(x) or x = g(y), depending
on which input is known first.
Form of the Two-Way Function
( , ) ( , )
( , ) ( , ( ))
( , ) ( ( ), )
( , ) ( , )
F
F x x f x
F y g y y
F x y x y
`
Two-Way Function Properties
The two-way function is monotonic. That is, if (a,b) (c,d) then F(a,b) F(c,d).
The two-way function is continuous. That is, F(V(a,b)) = V F(a,b) for any chain.
This means F has a least fixed point for any two signals.
Another Two-Way Function
Account with monthly investments m:
0
0
( ) / (1 )
( ) (1 )
tk
k
tk
k
m FV FV i
FV m m i
Another Two-Way Function
In terms of x, y, f, and g:
( ) ( )
( ) ( )
f x m x
g y FV y
In Ptolemy II
This two-way function will not currently run, because the Ptolemy expression language cannot not support the “sum” function.
If it did however...
In Ptolemy II
Money Networks A money network is any synchronous-
reactive network used to calculate monetary values.
A money network describes an investment situation.
This network allows fast redefining of inputs and outputs (present and future values).
N-Way Function Recall the situation where monthly
investments of m are made.
1
0
1( )
(1 )
( ) (1 )
t
nn
tk
k
PV m mi
FV m m i
N-Way Function If we know either m, PV, or FV, we
know all three values, because
1
0
1( ) 1/
(1 )
( ) 1/ (1 )
t
nn
tk
k
m PVi
m FV i
N-Way Function
and
1
0
1( ) ( )
(1 )
( ) ( ) (1 )
t
nn
tk
k
PV FV m FVi
FV PV m PV i
N-Way Function This suggests a generalization of the
Two-Way Function to n signals. If one signal is known, all other signals
equal a function of that signal. Otherwise, the signals do not change.
Three-Way Function Example
2 3
1 3
1 2
1 1 1 1
2 2 2 2
3 3 3 3
( , , ) ( , ( ), ( ))
( , , ) ( ( ), , ( ))
( , , ) ( ( ), ( ), )
x x
x x
x x
F x x f x f x
F x g x x g x
F x h x h x x
( , , ) ( , , )F a b c a b c,otherwise
Ptolemy Model(not implemented)
Number of Functions For the simple three-way function, we
require 6 functions. In general, we require n(n-1) functions
for an n-way function. We can reduce this number to n when
all the functions are invertible. This function is one such function.
Key Result: Networks on N-Way Functions
If a set of N-way functions is connected in a graph, knowing the value along exactly one edge determines the values at all other edges of the graph.
This value can be set by another function, such as the constant function in Ptolemy.
Conclusions
Money networks make it possible to determine several present and future values based on a single value.
The same money network can be used to determine different values.
In a connected network, knowing a single value determines all others.
Future Work: Improving Money Networks
Build a library of money network functions.
Improve the GUI representation of money networks in Ptolemy II.
Extend the Ptolemy expression language to handle more general expressions, such as “sum”