Teller provides trend identification and forecasting facilities based on bank transactions. Teller can be used from both Purescript and Javascript/Typescript.
Documentation is published on Pursuit.
npm install teller-js
Teller provides its own Typescript definitions
// Given some transaction data
import {
identifyTrends,
isSpecificWeekdayTrendDescription,
isEveryWeekdayTrendDescription,
} from "teller-js";
const transactions = [
{
accountId: "8Ybo8ppEBrHxJM45p7koSvaKQnM341fyMKQwO",
timestamp: 1586473200000.0,
amount: 0.01,
merchantName: "Asda",
reference: "Asda",
},
...{
accountId: "8Ybo8ppEBrHxJM45p7koSvaKQnM341fyMKQwO",
timestamp: 1586300400000.0,
amount: -60.0,
merchantName: "201053 53364402 MOBILE-CHANNEL FT",
reference: "201053 53364402 MOBILE-CHANNEL FT",
},
];
const result = identifyTrends(transactions);
result.forEach((tr) => {
const merchant = tr.value0;
const trend = tr.value1;
// See dist/index.d.ts for a full list of all potential trend description types
if (isEveryWeekdayTrendDescription(trend)) {
console.log(`${merchant} transaction happens every day`);
}
if (isSpecificWeekdayTrendDescription(trend)) {
// Monday is 1, Sunday is 7
const days = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
console.log(
`${merchant} transaction happens every ${days[trend.value0.weekday - 1]}`
);
}
});
- Surface algorithm confidence as a percentage in the trend description result
- Return the prediction for the price that will be paid given a trend so the trend can be used for prediction
- Given a start and an end date forecast spending income and balance for each day in the period
- Given a set of transactions and a trend identify if the trend is holding recently
- Treat identified trends as fixed costs and provide a estimation of a persons monthly fixed costs