Professional Documents
Culture Documents
Shore Crypto Pricing and Allocation Engine
Shore Crypto Pricing and Allocation Engine
Shore Crypto Pricing and Allocation Engine
_______________
A Capstone Report
Presented to the
_______________
In Partial Fulfillment
Bachelor of Science
in
Computer Science
_______________
by
Holly Stephens
Fall 2021
2
Copyright © 2021
by
Holly Stephens
by
Holly Stephens
technology. The purpose of this project is to provide Shore Crypto with a prototype of a tool
which will enable the company to simulate the impact that changes in certain financial variables-
such as the price of insurance premiums or the interest rates offered to investors- will have on its
insurance risk pools. This will be implemented through a web application created exclusively for
Shore Crypto’s use. The population affected by this project is composed of investors in Shore
Crypto and clients of Shore Crypto. The anticipated outcomes of this project are that Shore
Crypto will be empowered to be more competitive in both the prices it sets for its clients, as well
as the interest rates that it offers to its investors, and lastly an optimization of the growth of
INTRODUCTION
has remained the same: to pool risk from individuals and redistribute it across a larger portfolio.
Like any business, success is largely defined by the ability to collect an economic profit. To
achieve this, any entity selling insurance must set premiums and assume risk in a way that is
auspiciously calculated. Technology has been a boon to market expansion and has made
insurance an even more ubiquitous practice. This expansion and increase in connectivity has
escalated competition across all markets, which in turn, has compounded the necessity for any
given business to find innovative ways to set themselves apart. For those in the insurance sector,
they now must make their aforementioned calculations with more precision and edge than ever
before.
END USER
Shore Crypto’s Pricing and Allocation Engine is a tool to provide additional insight into
making such calculations. It is a web application that is designed exclusively for a startup
insurance company called Shore Crypto and provides an interactive simulation experience for the
company and allows it to better hypothesize how any number of its insurance risk pools will
8
react when adjustments are made to various inputs and outputs. These inputs and outputs include
things like investments, premiums, interest rate payouts, and insurance claims. These simulations
are stored for later reference and manipulation, so that Shore Crypto has a way of comparing and
contrasting different scenarios. This tool helps the company to better assess if the interest rates
they are offering on investments or premiums they are charging their clients are competitive
enough and are ultimately profitable for the company. It also aids the company in understanding
what interest rates and premiums are best suited for their targeted market.
necessary tool found in nearly every company’s arsenal. The global spending on big data
analytics topped 180 billion USD in 2019 alone (Research and Markets, 2020). In order to give
themselves a competitive edge, companies in their nascent stages are now looking for ways to
leverage data analytics. In this search, one can find a plethora of tools on the market, such as
Tableau and Microsoft Power BI, which offer robust platforms for data reporting, visualization
and analytics, and other tools such as Simcad Pro, which provide users with interactive
simulation modeling environments. While these tools are designed to be highly customizable and
relatively easy to use, they can also add complexity and overhead when attempts to fit them to
very particular end user experiences are made. Companies like Shore Crypto seeking to use
interactive data simulations with a certain level of granularity, and with very particular ends in
9
mind, end up spending more time and money than they need to, using a number of these tools in
orchestration to achieve their goals, while ultimately compromising on the desired end user
experience.
FEASIBILITY REPORT
During the nascent research stage of this project, an environmental scan was conducted to
assess what similar products might already exist. While there are a number of tools and
applications that exist to aid users with the visualization and analysis of their data, such as
Microsoft Power BI, Google Data Studio, and Tableau, nothing was found that would achieve
Shore Crypto’s specific simulation goals out of the box. The important distinction between these
tools and Shore Crypto’s Pricing and Allocation Engine is scope and focus.
interactive it is. A user can “use developer tools to create custom Power BI visuals” (Microsoft,
2021). With a Power BI account, VS Code, and a command line, a user can design visuals that
they can import into their Power BI environment. While this kind of customization is incredibly
robust, Shore Crypto requires a more focused simulation experience that goes beyond what
Power BI provides out of the box. While this project lacks much of the broad scope and back-end
10
customization that Microsoft Power BI offers, it supports a highly specific network of variables
insure smart contracts on blockchain. With this in mind, the stakeholders of this project can be
identified as Shore Crypto, individuals or entities that invest in Shore Crypto, and individuals or
entities that purchase insurance from Shore Crypto. The communities that define these groups
are the finance and cryptocurrency communities. This project directly impacts the success of
Shore Crypto because it plays a critical role in deciding interest payout rates made to investors
and insurance premiums for customers. This is because the project provides simulation
capabilities for the company to better assess how its risk pools are affected by different premium
and interest payout rates. In having a tool to compare hypotheticals, Shore Crypto can now offer
optimally competitive rates. With this outcome, the project also affects investors and clients
because of its involvement in financial factors that are directly linked to these parties. If
leveraged correctly, investors will see satisfactory returns and will continue to keep their
currency invested in Shore Crypto, and those buying insurance from Shore Crypto will deem the
cost of insurance well worth the mitigated financial risk in using smart contracts. Shore Crypto
will benefit from this three-way symbiotic relationship as well. Another possible outcome is that
smart contracts will become more ubiquitous and established in mainstream corporate finance,
it will tread upon. While a few ethical and legal issues were identified, these all had to do with
potential misuse of the product. Because this product is designed for such a targeted audience,
attempting to mitigate these risks within the scope of the project was deemed infeasible. To
elaborate on these potential issues further, the product could be used to set price points that are
heavily skewed towards the benefit of Shore Crypto at the expense of the investors and clients.
Moreover, because this company is aiming to be the first to market, there will be virtually no
alternatives, making this concern more salient. This concern is somewhat innately addressed by
the argument that entering the market with price gouging tactics would benefit no one, and this
would be an unlikely and inauspicious pursuit. Beyond the scope of this project however, I think
it would be worth considering developing a service that could help its users assess economic
health holistically and provide forecasting capabilities for the impact various simulations might
The potential legal issues noted stemmed from the litany of legal considerations that are
concomitant with insurance agencies. That being said, this product was not designed to have any
involvement in policy making or the handling of claims. It is merely designed to help Shore
Crypto determine optimal price points. Because it is intended to be strictly an internal tool for the
development continues, it has the potential to become a core piece of the business and potentially
a marketable product further down the road. As previously mentioned, there is a growing list of
future enhancements, as the initial scope of the project was limited for the desired objectives.
There are a number of features that could be added that would improve the user experience of
running a simulation. Currently, when a simulation is selected and then run, there are daily
snapshots that can be stepped through frame by frame and a section for comparing the initial and
final state of the risk pool. Added visualizations in both of these sections and data filtering
capabilities would greatly enhance the end user experience. Additionally, the administration
aspect of the product could be further improved upon with more self-service options, the ability
to create user new roles and permissions, and the ability to delete existing users and simulations.
13
PART II
PLATFORM
This project is implemented as a Node.js web application using an Express framework
and a MySQL database. Node.js was selected for this project for its high performance,
scalability, and adaptability. The primary goal of this project was to enable risk pool simulation,
which can be achieved with the foregoing. The secondary goal was to provide complementary
visualization capabilities. As the project progressed, it became clear that this task was too
wieldy for the scope of this project, and has been added to a list of future feature
recommendations.
MAJOR FUNCTIONS
As this project was developed to be a proprietary product, there is a default administrator
account that has been handed over to the CEO of Shore Crypto. This account handles user
administration, should the user base for this project grow. The administrator account is able to
create new accounts and delegate a role of either “standard” or “administrator” to them. Users
with an administrator account are able to view and modify all data. Users with a standard
account will not have access to user administration and will only be able to modify simulations
they are the owner of, however they will be able to view and run all simulations.
14
In creating a new simulation, a user is prompted to fill out a number of variables that will
dictate how the simulation is run and what decisions will be made during said run. There are two
(interdependent) heuristics that are used to set the interest rate Shore Crypto will offer to
investors on a given day and to determine the amount investors will invest or divest on any given
day. Each of these heuristics have variables that the user can define and adjust during simulation
When a simulation is run, it’s information is pulled from the database and starting daily
values are calculated and set. An array of simulation days is created and the first day is populated
with the starting values. From there, the remaining simulation days are calculated one at a time
using heuristics with user defined parameters and information from the previous day to calculate
and set the current day’s metrics. There are a number of tracked variables in which these
aforementioned metrics are added to. Once all simulation days have been calculated, these
15
variables will represent the total metrics of the simulation run. From an end user’s view, the final
metrics are displayed and below this a series of slides showing each simulation day’s data.
USABILITY TESTING
As previously stated, Shore Crypto is a startup company in its nascent stages of
development. This means that the project will have a singular test subject: the CEO of Shore
Crypto and the creator of the concept this project has been based upon. Since the objectives of
this project were written as user stories, extrapolating a list of tasks to perform during testing was
quite straight forward. These tasks involved logging in, finding list views, creating users and
simulations, and lastly, running a simulation. While there was continuous communication and
feedback with and from the CEO of Shore Crypto throughout the duration of the project, due to
the simulation feature taking longer to complete than projected, the first of the two planned
11/29/2021. Testing was done on my device, meaning all that was needed to perform the testing
was a laptop and internet connection. There were no issues completing any of the tasks and
feedback was positive. Despite the majority of the aforementioned tasks focusing on data
creation and administration, the bulk of the time spent was on the simulation run logic. My client
was able to create a simulation on his own, run the simulation, and interpret the results. There
were questions about the backend heuristics used, and after some discussion, we agreed pulling
17
the majority of previously fixed constants used in the heuristics up into the UI would be
Shortly after drafting an initial timeline, there was some considerable rearranging of the
milestones in the project timeline. This was due to concerns with the simulation milestones
potentially growing and consuming the entire project timeline. It became clear early on in the
development process that completing the simplest features first, would be an easy way to ensure
these features were not compromised as a result of the possible aforementioned outcome.
Despite these concerns, all milestones initially set for the project were completed. The
create and run simulation milestones did take more time than initially planned; the create
simulation milestone tasks were stretched into the preceding and following week, and the sprint
for the run simulation milestone ended up being extended into a second subsequent sprint. Both
of these milestones taking additional time were a result of the complexity of the requirements.
With this timeline adjustment, it also made sense to cut the two planned client reviews down to
one. No major bugs were encountered. While scheduling changes to the run simulation milestone
did stretch the project timeline by an additional week, this was not an issue as the project was
initially planned with an extra week in reserve for this reason. There were no incurred costs in
FINAL IMPLEMENTATION
The end result of the project is a web application in which a user can securely sign into.
There are two types of user accounts: administrator users and standard users. Once logged in, an
administrator user can create, edit, and delete simulations and other user accounts, run
simulations, and change their own password. A standard user will not be able to view or manage
other users and will only be able to edit or delete simulations that they themselves have created.
Standard users can view and run all simulations and are also able to change their own password.
20
The structure of the simulation consists of what we can think of as three separate entities:
the risk pool entity, the client entity, and the investor entity. The risk pool entity holds the data
about the insurance risk pool that is being simulated. It contains variables like an initial balance.
The client entity represents the people or corporations that are either adding to the risk pool
during the simulation by paying insurance premiums, or subtracting from it by filing claims.
During the run of the simulation, this data remains static and distributed evenly throughout the
duration of the simulation. Making this entity dynamic and predictive is on the list of future work
suggestions for the project. The investor entity represents the people or corporations that are
either adding to the risk pool during the simulation by investing in the risk pool for an interest
rate offered to them or subtracting from it by either divesting or receiving interest payments on
their investment. The investor entity has the largest number of user input fields, as this entity’s
21
behavior changes during the run of the simulation, and it was deemed paramount that the user be
When a simulation is run, there are two heuristics in the code that will use the
information from the investor entity section of the simulation to determine investor behavior and
the company’s adjustment to the interest rate offered to investors. More specifically, the first
heuristic determines the amount invested on a certain day by looking at recent risk pool growth
and the interest rate offered to investors on that day. The user specifies weights of significance
for each of these factors and this outcome scales the initial expected daily investment by some
amount. This of course can be negative, which would signify divestment. The second heuristic
22
sets the interest rate by comparing recent risk pool growth against a target growth goal.
Depending on how these numbers compare, the interest rate may be stepped up or down,
provided this would not cross the bounds of user dictated minimum and maximum values.
Ideally in the future, other factors would weigh in as well. Perhaps tracking more long term
trends of investor behavior, and in considering how much of the risk pool funds have been
allocated. Samples of code have been omitted from this section at the client’s request of
maintaining confidentiality.
The rollout of the project is fairly straightforward, as the user base is currently only one
person, the CEO of Shore Crypto. There is detailed documentation on access, use, and set up for
DISCUSSION
milestones timeline early on. The planned development time for the features allowing users to
create and run simulations was nearly doubled. This was not an unexpected or unplanned
outcome- the vision behind this project remains incredibly complex and will take far more
development time than the scope of this project could have ever accommodated. The main
challenge this posed, and what ultimately proved to be the most difficult problem to solve in this
project’s lifecycle, was having to boil these goals down into something both achievable and
meaningful. Compounding this problem of nailing down technical specifics was that there were
no written technical requirements for this project provided by the client; only broad strokes of
23
the end goal were described over several conversations. In grappling with this issue, priorities
were shifted. It became increasingly clear that a more meaningful prototype would attempt to
tackle some of the logistical hurdles, rather than simply creating visuals that were nice to look at.
Consequently, what was originally planned to be a predominantly visual user experience became
a more technical one. Once goals and priorities were reorganized, however, there were no major
This project was completed individually, which also had its challenges. Tasks could not
be delegated and technical discussions were not possible. Despite these issues, having sole
control over the direction and implementation of the project was incredibly empowering.
Stepping into multiple roles involving planning, communication, reporting, and development
From the genesis of this project, it was always understood that a litany future work would
follow in its wake in order to achieve the client’s ultimate vision. Throughout the development of
this project, these next steps were more concretely elucidated. Improvements to the predictive
heuristics would greatly benefit the project, with considerations like percentage of risk pool
funds that are allocated when setting the offered interest rate. The expansion of these heuristics
to all entities, and additionally creating a way for users to dynamically pull more entities, such as
other risk pools, into the simulation creation process will also be key in a continued effort to
strive towards the client’s vision. Aside from logistical improvements, visualization capabilities
24
are also on the list of important features to add. There is a Node.js library called Chart.js that
seems like a good candidate for proof of concept work in this area.
25
REFERENCES
https://docs.microsoft.com/en-us/power-bi/developer/visuals/develop-circle-card
Global Big Data Analytics Market Size, Market Share, Application Analysis, Regional
Outlook, Growth Trends, Key Players, Competitive Strategies and Forecasts, 2019 To
2027.
https://www.researchandmarkets.com/reports/4992328/global-big-data-analytics-market-
size-market?
utm_source=dynamic&utm_medium=GNOM&utm_code=jjrj62&utm_campaign=13593
21+-+Big+Data+Analytics+Industry+Report+2020+-+Rapidly+Increasing+Volume+
%26+Complexity+of+Data%2c+Cloud-Computing+Traffic
%2c+and+Adoption+of+IoT+%26+AI+are+Driving+Growth&utm_exec=joca220gnomd
26
27
APPENDIX
APPENDIX A
Tools Used:
GitHub
Visual Studio Code
Heroku
MySQL Workbench
Express.js
Copy the ssh url under the green code button in the repository and save this for establishing a
connection via the command line
cd [local directory]
git init
ssh -T git@github.com
git pull [ssh url from git repo copied from previous section]
git remote add origin [ssh url from git repo copied from
previous section]
(verify connection)
git remote -v
Now you can make local changes! Copy existing project files into [local directory]
To commit the changes to your git hub repository initially, and every subsequent time in
the future, enter the following commands:
git add .
git push
To run the newly created project locally, to test changes before commiting to your
GitHub repo, run the following commands:
cd [local directory]
30
nodemon app.js
Note: Node.js will need to be installed before this, if it has not been already. Detailed
instructions can be found here: https://docs.npmjs.com/downloading-and-installing-
node-js-and-npm
In the event that this project is taken up by someone else and it is desired
to continue hosting the app on Heroku, the Heroku App will need to be
recreated
This will create a remote database you can manage through MySQL Admin.
[redacted]
5. Create a simulation
11. Observe access limitations (cannot access edit pages, delete buttons, or user views)
12. Log back in as administrator and edit the standard user to have administrator role