Is Prolog a good tool for this kind of problem?
From: Neil (njensen_at_habaneros.com)
Date: 04/14/04
- Previous message: reader: "Re: Any Crossword puzzle example?"
- Next in thread: Bill Spight: "Re: Is Prolog a good tool for this kind of problem?"
- Reply: Bill Spight: "Re: Is Prolog a good tool for this kind of problem?"
- Maybe reply: Neil Jensen: "Re: Is Prolog a good tool for this kind of problem?"
- Reply: Josh Smith: "Re: Is Prolog a good tool for this kind of problem?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 13 Apr 2004 15:26:45 -0700
We have an interesting potential project with a long-term client in
the financial services industry. While I know that we can code this
using a procedural approach, it tends to be pretty long and ugly.
Based on skimming through some of the Prolog tutorials and docs, it
appears as if Prolog might be a more efficient way to handle this type
of problem.
I'd appreciate any comments on this approach before we invest a lot of
time into it. Thanks in advance.
Scenario:
Determine the transactions required to rebalance a portfolio of mutual
funds so that the asset allocation matches a target allocation, while
minimizing the overall tax burden triggered by the transactions.
Details:
A portfolios consist of one or more individuals who each own one or
more accounts which each have one or more mutual funds.
Individuals have different tax rates.
Accounts may be of different types (e.g. taxable, non taxable). The
different account types also have restrictions with respect to the
amount of foreign content in the account. Buying and selling within a
non-taxable account does not trigger capital gains, while taxable
accounts are obviously subject to tax. If funds are sold at a loss
less than 30 days after they are purchased, it is not possible to
claim a loss on the sale. The gain (loss) on the sale of each mutual
fund will depend on the current value and the adjusted cost base
(similar to average cost of purchasing the funds).
Each mutual funds belongs one or more asset class (e.g. equity,
international equity, bonds, etc.). When more than one fund is in an
asset class, a prioritized list is used to determine which funds are
purchased to meet the target allocation.
It is not required to meet the exact asset allocation target, instead,
a target and a range is given (e.g. 20% +/- 3%).
The goal is to generate a list of transactions within each account
that will achieve the overall allocation while minimizing the overall
tax bill.
- Previous message: reader: "Re: Any Crossword puzzle example?"
- Next in thread: Bill Spight: "Re: Is Prolog a good tool for this kind of problem?"
- Reply: Bill Spight: "Re: Is Prolog a good tool for this kind of problem?"
- Maybe reply: Neil Jensen: "Re: Is Prolog a good tool for this kind of problem?"
- Reply: Josh Smith: "Re: Is Prolog a good tool for this kind of problem?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|