Math Typesetting
The natural candidate here is KaTeX. Even quite complex equations, such as the solution of the following backward parabolic PDE
given by the Feynman-Kac formula
with some terms left undefined are rendered easily. There is a form of the formula with weak enough assumptions that it can be used for option pricing.
Syntax Highlighting
Another feature we would like to have is to be able to post code blocks with syntax highlighting like so
using JuMP
using Ipopt
using LinearAlgebra
import MultiObjectiveAlgorithms as MOA
function mean_variance(μ, Σ)
# Use Ipopt as the QP solver with no logging.
optimizer = optimizer_with_attributes(
Ipopt.Optimizer,
"print_level" => 0
)
# Use multi-objective optimization to solve
# for the whole efficient frontier.
model = Model(() -> MOA.Optimizer(optimizer))
set_optimizer_attribute(
model,
MOA.Algorithm(),
MOA.EpsilonConstraint()
)
set_optimizer_attribute(model, MOA.SolutionLimit(), 20)
# Define the variables.
@variable(model, 0 <= w[1:size(μ)[2]])
# Define the constraints.
@constraint(model, sum(w) == 1)
# Define the objective.
@expression(model, expected_return, μ ⋅ w)
@expression(model, variance, w' * Σ * w)
@objective(model, Max, [expected_return, -variance])
# Run the optimizer.
optimize!(model)
# If we haven't found an optimal solution
# something has gone wrong somewhere.
@assert is_solved_and_feasible(model)
return model
endwith some kind of a configurable style.
Favicon
We start by designing a single square SVG file. For this we use the Favicon Maker by Formito with the following specification
- Content: Initials "MA"
- Typography: Noto Serif font, weight 400, size 45
- Color Palette: Background
#dddddd, Letter Color#555555
We then use RealFaviconGenerator to convert the SVG file to all the necessary sizes and file types required to support every modern platform and device.
Sidenotes
A good resource on the topic is provided by Gwern.