-
Notifications
You must be signed in to change notification settings - Fork 0
/
bond_metrics.sh
executable file
·40 lines (36 loc) · 963 Bytes
/
bond_metrics.sh
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
#!/bin/bash
#
# given a DIR from which to load the markup csv files,
# a security TYPE,
# a PRICE,
# maturity MONTH,
# maturity DAY,
# maturity YEAR,
# and (if TYPE was MUNI) a RATING
#
# this script will print a marked up price to stdout.
#
# Example:
#
# bond_metrics.sh src/sample_markup_sheets MUNI 101.2 12 11 2024 AAminus
#
cd `dirname $0`
if [ -z "$1" ]; then
echo "$0: error: expected a directory from which markup schedules will be loaded" 1>&2
exit 1
fi
schedules_src_dir=$1
shift
if [ ! -d "$schedules_src_dir" ]; then
echo "$0: error: could not find directory \"$schedules_src_dir\"" 1>&2
exit 1
fi
case "$OS" in
win*)
schedules_src_dir=`cygpath --mixed $schedules_src_dir`
;;
esac
export CLASSPATH="bin;bond_metrics.jar;$schedules_src_dir;$CLASSPATH"
java bondmetrics/Markup $@
exit
$dp/qr/bond_metrics/bond_metrics.sh src/sample_markup_sheets MUNI 101.2 12 11 2024 AAminus