text:
Nexon, NCsoft said to have Valve in their sights
NC Soft founder Kim Taek-jin, left, and Nexon founder Kim Jung-ju appear to be moving in step to grow their businesses. [JoongAng Ilbo]
The two founders of Korea's leading game companies may be moving to acquire Valve, one of their top five rivals in the United States.
If so this would mark the first joint action that Nexon has taken with No. 2 player NCsoft since Nexon became its majority stakeholder earlier this year.
Nexon founder Kim Jung-ju and NCsoft founder Kim Taek-jin reportedly met two weeks ago in Hawaii to discuss the details of buyout strategies, industry sources told the JoongAng Ilbo. The meeting was set up as Kim Jung-ju invited his counterpart to Nexon's developers' summit in Hawaii. There, Nexon's major software developers gathered to discuss ways of developing next-generation games.
Another industry source, who asked to not be named, said they also discussed ways of taking control of Valve, known for both its first-person shooter game Half-Life and as the brains behind Steam, an online platform that distributes games with an estimated 40 million subscribers. It accounts for 70 percent of all computer game downloads worldwide.
"The world's largest game companies have been paying keen attention to Valve because if this acquisition is successful, the companies can not only develop games but also distribute them independently," said Park Yong-hu, a communication strategy adviser for KakaoTalk, Korea's most popular online messaging service.
Kim of Nexon showed his interest in Valve during a presentation he gave in Daegu earlier this month.
"Of all the numerous companies I've visited, Valve in Seattle left the strongest impression," he said at the time. "Although Nexon is generating a profit, I'm jealous of the intellectual property rights and business strategies that global game companies have."
Valve is believed to be worth $2.5 billion. America's Electronic Arts, which is best known for its FIFA soccer games, reportedly offered $1 billion to acquire it earlier.
The two Korean companies have already begun setting aside money for future projects. In June, NCsoft sold its 14.7 percent share to Nexon for 804.5 billion won ($ 720 million). Industry experts speculated that NCsoft was gearing up for future M&As as Kim of Nexon said at the time that the two companies were aiming to advance into the global market together.
Both companies denied the two Kims had discussed acquiring Valve at their summit, insisting that the acquisition rumors are just that. Moreover, it is not even clear whether the company is up for sale as Valve does not appear to be under any pressure financially at present.
Valve CEO Gabe Newell, in an interview with The New York Times earlier this month, said the company had a better chance of "disintegrating" than in being absorbed by a rival.
By Park Tae-hee, Lee Ho-jeong [summerlee@joongang.co.kr]


text:
@interface NWIOCounterTest : SenTestCase
@end

redpajama_set_name: RedPajamaGithub


Needundies.com has a great range of bras for smaller busted women or for girls who are beginning to develop breasts. Covering sizes 28-36 AAA-C, we really do cater for the petite bust. Our range includes high cotton content training bras which will provide comfort to those who are new to wearing bras and for an added boost we also stock padded bras which emphasise your bust.


I recently learned that my dear friend, Kelly Connaghan Dengler, wrote a children's book, Bunny in the Basket, that comes with a plush bunny in the basket that your child can name. The simple story explains to children (and parents) how the bunny works, it's similar to the Christmas elf idea for Easter time.
Through the bunny, Kelly tries to give parents that extra set of eyes and gives kids a little motivation to exhibit good behavior since the bunny is watching and reporting back to Peter Cottontail.
When our package arrived, I wasn't sure how it was presented so even though Anna was dying to open the newly delivered box, I waited until she went to school to check it out. I didn't need to worry, it was child-friendly and packaged with the book and bunny together peeking out through the box. I read the book and left it, with the pale blue bunny in the basket, for my daughter at her place at the dinner table.


This is a poem on the journey of spirituality. The quest for the spiritual man is to return to the purest form of an infant who we are born as. As life goes by, the scars of experience and the scab of the world erodes that angelic innocence.
How do we bring up our kids to grow up maintaining the integrity, fun and joy of childhood to their adulthood intact? How do we instill character that doesn't need a journey back in time anymore?
their lives on a perilous journey.
Tomorrow his world to seize.
His yesterdays escaping his gaze.
A fiery white hue with a golden blaze.
A cloak of godliness did protect.
His happiness does momentarily flee.
And to earn love he must impress.
The infant and his moment antique.
Purity takes wings like a bird freed.
His heart and negativity often did flirt.
Spirituality, your map is so confused.
While the poem is good and makes one sit and think, in between the lines there is disillusion ,regret and sadness.


text:
Q: What is the proper syntax for getting a Makefile to print the output directory of one of its output zip files? I'm trying to edit an Android Makefile in the hopes of getting it to print out the directory (path) location of one the ZIP files it creates.  Ideally, since the build process is long and does many things, I would like for it print out the pathway to the ZIP file to a text file in a different directory I can access later:
Pseudo-code idea:
# print the desired pathway to output file
print(getDirectoryOf(variable-name.zip)) > ~/Desktop/location_of_file.txt

The Makefile snippet where I would like to insert this new bit of code is shown below.  I am interested in finding the directory of $(name).zip (that is specific file I want to locate):
# -----------------------------------------------------------------
# A zip of the directories that map to the target filesystem.
# This zip can be used to create an OTA package or filesystem image
# as a post-build step.
#
name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
  name := $(name)_debug
endif
name := $(name)-target_files-$(FILE_NAME_TAG)

intermediates := $(call intermediates-dir-for,PACKAGING,target_files)
BUILT_TARGET_FILES_PACKAGE := $(intermediates)/$(name).zip
$(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
$(BUILT_TARGET_FILES_PACKAGE): \
        zip_root := $(intermediates)/$(name)

# $(1): Directory to copy
# $(2): Location to copy it to
# The "ls -A" is to prevent "acp s/* d" from failing if s is empty.
define package_files-copy-root
  if [ -d "$(strip $(1))" -a "$$(ls -A $(1))" ]; then \
    mkdir -p $(2) && \
    $(ACP) -rd $(strip $(1))/* $(2); \
  fi
endef

A: As part of your rule's action (that is, as one of the lines indented by a tab, or as a command that follows a semicolon):
@echo $(dir $(variable-name).zip)

If output to a file is desired,
@echo $(dir $(variable-name).zip) >~/Desktop/location_of_file.txt

and you can make the > a >> if you prefer to append to the file rather than to overwrite.
UPDATE
What does it mean, "As part of your rule's action (that is, as one of the lines indented by a tab, or as a command that follows a semicolon)"?
Answer:  It means that you can @echo like this:
file-to-be-built: dependencies
        some-command
        @echo foo
        another-command

Or like this:
file-to-be-built: dependencies
        @some-command; \
        echo foo; \
        another-command

(note the placement of the @).  Or like this:
file-to-be-built: dependencies; @some-command; echo foo; another-command

But not like this:
@echo foo
file-to-be-built: dependencies
        some-command
        another-command

(Here is yet another parenthetical statement, which you can ignore if you like:  The @, as you may know, suppresses Make's copying of the command itself to standard output.  You can omit it, of course, but if you include it then you must put it before the specific command you don't want Make to copy.  Formally, the versions without semicolons issue multiple, separate commands in their own, separate environments, using separate invocations of the shell; whereas the versions with semicolons only invoke the shell once, with a single environment, and leave it to the shell to separate and execute the commands.  Does this make sense?  Maybe not, if you just read it -- I can't make much sense of such tangled verbiage, either, even though I wrote it, myself -- but do try it with the @ in the various spots indicated and it should soon start to make sense to you.  The @ is no big deal in any case, but it's there to use to keep Make's output clean if you understand how to use it.)

redpajama_set_name: RedPajamaStackExchange


text:
\section{Introduction}

Many stochastic problems in finance and risk management are high-dimensional with a univariate quantity of interest, say $\mu=\mathbb{E}(\Psi(\bm{X}))$ for some integrable function $\Psi:\mathbb{R}^d\rightarrow\mathbb{R}$ and random vector $\bm{X}\sim F_{\bm{X}}$ for some $d$-dimensional distribution function $F_{\bm{X}}$. Because $\mu$ rarely allows for an analytical expression,
the plain Monte Carlo (MC) estimator $\hat{\mu}^\text{\tiny{MC}}_n=(1/n)\sum_{i=1}^n\Psi(\bm{X}_i)$ where $\bm{X}_1,\dots,\bm{X}_n\omu{\text{\tiny{ind.}}}{\sim}{} F_{\bm{X}}$ is a popular choice for finding approximate solutions to such problems. It is unbiased and has an estimation error converging to zero at a rate independent of the dimension of the problem is often popular for finding approximate solutions to such problems.
The drawback of plain MC is the high computational cost it requires to obtain an estimate with a sufficiently small error. This issue is particularly severe for rare-event simulation, i.e., when $\P(|\Psi(\bm{X})|>0)$ is small, as then a typically very large number of samples is required to obtain non-zero observations and therefore an estimator with small variance. As such, plain MC is often combined with variance reduction techniques (VRTs), such as control variates (see, e.g., \cite{lavenbergwelch1981}) or stratified sampling (SS) (see, e.g., \cite{cochran2005}) to make the variance and thus the width of the estimate's confidence interval small.

Importance sampling (IS) is a VRT frequently applied to rare-event analysis in order to improve the reliability of MC estimators; see, e.g., \cite{kahnmarshall1953} and \cite{asmussenglynn2007}. The main idea of IS is to draw samples from a proposal distribution that puts more mass on the rare-event region of the sample space than the original distribution.
As the efficiency of IS depends heavily on the choice of the proposal distribution, finding a good proposal distribution is a crucial step in applying IS.  Unfortunately, there is no single best strategy known for finding a good proposal distribution that works in every situation since the nature of the rare event and what constitutes a good proposal distribution depends on the problem at hand; that is, on $\Psi$ and $F_{\bm{X}}$.
As such, much of the existing work on IS in computational finance finds effective proposal distributions by exploiting the structure of specific problems: \cite{glassermanheidelbergershahabuddin1999} develop IS methods to price path-dependent options under multivariate normal models; \cite{glassermanheidelbergershahabuddin2000, glassermanheidelbergershahabuddin2002} estimate the Value-at-Risk of a portfolio consisting of stocks and options under a normal and $t$-distribution; \cite{sakhormannleydold2010} estimate tail probabilities of equity portfolios under generalized hyperbolic marginals with a $t$-copula assumption; \cite{glassermanli2005} estimate tail probabilities of credit portfolios under the Gaussian copula, \cite{bassamboojunejazeevi2008, chankroese2010} consider $t$-copula models.
As all these IS techniques are exploiting specific properties of the problem at hand, they can achieve substantial variance reduction but are typically specific techniques  not applicable to other problems without major modifications.

The contribution of this work is the development of theory and algorithms to apply IS for a wide range of problems by introducing a conditioning sampling step and optimally twisting the distribution of the conditioning variable. Let $T=T(\bm{X})$ be some univariate random variable, such as $\bm{\beta}^{\top}\bm{X}$ for some (well chosen) $\bm{\beta}\in\mathbb{R}^d$, and assume sampling from $\bm{X} \mid T$ is feasible. If $T$ has density $f$ (resp., $g$) under the original (resp., proposal) distribution (both distributions assumed to have the same support $\Omega_T$ for now), let
$$\hat{\mu}^{\text{\tiny{IS}}}_n = (1/n) \sum_{i=1}^n \Psi(\bm{X}_i) f(T_i)/g(T_i),\quad T_i\omu{\text{\tiny{ind.}}}{\sim}{} g,\quad \bm{X}_i \omu{\text{\tiny{ind.}}}{\sim}{} F_{\bm{X}\mid T}(\cdot \mid T = T_i),\quad i=1,\dots,n.$$
 If $T$ explains much of the variability of the output, so if $R^2 := \operatorname{Var}( \mathbb{E}(\Psi(\bm{X}) \mid T) ) / \operatorname{Var}(\Psi(\bm{X}))$ is large, we can choose $g$ optimally and make the rare event more likely by changing the distribution of $\bm{X}$ through changing the distribution of the univariate $T$. Many high dimensional financial problems are of this nature; see, e.g., \cite{caflischrusselmorokoffowen1997, wangfang2003, wangsloan2005, wang2006}.

In order to analyze our estimator, we work with the semi-parametric model
$$\Psi(\bm{X})=m(T)+\varepsilon_{\bm{X},T}$$
 for some (unknown) transformation  $T:\mathbb{R}^d\rightarrow\mathbb{R}$, where $m^{(k)}(t)=\mathbb{E}(\Psi(\bm{X})^k\mid T)$ for $k\in\mathbb{N}$ and $\varepsilon_{\bm{X},T}$ is a random error so that $\varepsilon_{\bm{X},T}\mid T$ has mean 0 and variance $v^2(t)=\operatorname{Var}(\Psi(\bm{X})\mid T=t)$. We say that $\Psi(\bm{X})$ has a strong single index structure if $R^2$ is large (say, $R^2>0.9$), and the resulting estimator is referred to as Single Index IS (SIS) estimator.
We will show that the optimal proposal distribution for $g$ under SIS is proportional to $(m^{(2)})^{1/2}(t)f(t)$ resulting in an estimator with variance no larger than the plain MC estimator.
If the proposal distribution $g$ allows for a simple way to evaluate the quantile function $G_T^{-1}$ of $g$, we can further reduce the variance by applying equal stratification to the support of $T$, i.e., instead of sampling $T_1,\dots,T_n\omu{\text{\tiny{ind.}}}{\sim}{} g$, we can set $T_i = G_T^{-1}(U_i)$ where $U_k\omu{\text{\tiny{ind.}}}{\sim}{} \operatorname{U}( k/n, (k+1)/n)$ for $k = 0,\dots,n-1$ and $G_T^\i(u)=\inf\{t\in\mathbb{R}: G_T(t)\geq u\}$ is the quantile function of $T$ under $g$. The resulting method is referred to as stratified SIS (SSIS). We also derive optimal variance expressions in this case and show that (S)SIS gives zero variance when $R^2=1$.
The derivation of these results along with some more notation and the connection between our methods and the IS and stratification techniques from \cite{arbenzcambouhofertlemieuxtaniguchi2018, glassermanheidelbergershahabuddin1999,  neddermeyer2011} can be found in Section~\ref{sec:SIS:var:opt}. There, we also briefly explain how our conditional sampling step reduces the effective dimension of the problem and therefore makes quasi-Monte Carlo (QMC) particularly attractive in our setting; in QMC, pseudo-random numbers (PRNs) are replaced by more homogeneously distributed quasi-random numbers (see, e.g., see \cite{niederreiter1978, lemieux2009, dickpillichshammer2010}).

Besides the choice of $g$, the performance of our procedure heavily depends on the choice of the transformation $T$, which must be chosen such that i) sampling from $\bm{X}\mid T$ is feasible and ii) $T$ explains a lot of the variability of $\Psi(\bm{X})$, i.e., $R^2$ is as close to 1 as possible. The choice of the transformation is clearly not unique. In our numerical examples, we typically assume that $T$ is a linear function of $\bm{X}$, whose coefficients can be estimated via the average derivative method of \cite{stoker1986}, the sliced inverse regression of \cite{li1991} or the semiparametric least-squares estimator of \cite{ichimura1993}. We remark that these methods do not require the form of the function $m(t)$ to be known.

As seen earlier, the optimal proposal densities involve a conditional moment function that is not known in practice. We propose to estimate this function using pilot-runs. The resulting point-wise approximation to the optimal density function can then be integrated and inverted numerically using the NINIGL algorithm developed in \cite{hormannleydold2003}. When this is too time-consuming, we suggest finding an approximately optimal $g$ in the same parametric family as $f$ (e.g., a location-scale transform of the original density). We detail this calibration stage, i.e., the process of estimating $T$, the optimal density and a way to sample from it, in Section~\ref{sec:calibration}.

In the numerical examples in Section~\ref{sec:numexp}, we demonstrate that our methods are applicable to a wide range of problems and achieve substantial variance reduction. After investigating a simple linear model example, we consider the problem of tail probability estimation in Gaussian and $t$-copula credit portfolio problems and show that our methods outperform those of \cite{glassermanli2005} and \cite{chankroese2010}.

As our formulation of (S)SIS does not assume a specific $\Psi$ or $F_{\bm{X}}$, it is applicable to a wide range of problems and is efficient as long as the problem of interest has a strong enough single-index structure. It also adapts to the problem through the design of the one-dimensional transformation revealing the single-index structure and through the choice of the proposal distribution. Besides its applicability to a wide range of problems, our proposed method has the following advantages.
First, as it applies IS only to the univariate transformation variable, SIS is less susceptible to the dimensionality problem of IS, which is discussed in \cite{aubeck2003, katafygiotiszuev2008, schuelleretal2004}. This also simplifies the task of finding an optimal proposal distribution. Second, SIS has a dimension reduction feature, so it enhances the effectiveness of QMC sampling methods. Third, by applying IS to a transformation of the input random vector $\bm{X}$, our proposal distribution amounts to changing the dependence structure of the problem under study, which can have a significant advantage over methods that only change the marginal distributions.

We conclude this paper in Section~\ref{sec:conclusion}.

\section{Variance analysis and optimal calibration for SIS and SSIS}
\label{sec:SIS:var:opt}

\subsection{Notations and definitions}
To fix notation, recall we estimate $\mu = \mathbb{E}(\Psi(\bm{X}))$ via
\begin{align*}
\hat{\mu}^{\text{\tiny{SIS}}}_n = (1/n) \sum_{i=1}^n \Psi(\bm{X}_i) w(T_i),\quad T_i\omu{\text{\tiny{ind.}}}{\sim}{} g_T,\quad \bm{X}_i \omu{\text{\tiny{ind.}}}{\sim}{} F_{\bm{X}\mid T}(\cdot \mid T=T_i),\quad i=1,\dots,n,
\end{align*}
where $f_T$ and $g_T$ denote the original and proposal densities for $T$ with supports $\Omega_f=(t_{\inf},t_{\sup})$ (with possibly $t_{\inf},t_{\sup}\in\{\pm\infty\}$) and $\Omega_g$ and $w(t)=g_T(t)/f_T(t)$ is the IS weight function.

Furthermore, we model the output $\Psi(\bm{X})$ as $\Psi(\bm{X})=m(T)+\varepsilon_{\bm{X},T}$, where
\begin{align*}
m^{(k)}(t)=\mathbb{E}(\Psi(\bm{X})^{k}\mid T),\quad \mathbb{E}(\varepsilon_{\bm{X},T}\mid T)=0,\quad \operatorname{Var}(\varepsilon_{\bm{X},T}\mid T)=v^2(t)=\operatorname{Var}(\Psi(\bm{X})\mid T).
\end{align*}
We already introduced the coefficient of determination $R^2 = \operatorname{Var}(m(T))/\operatorname{Var}(\Psi(\bm{X}))$ (see, e.g., \cite{kvaalseth1985}) and said that $\Psi(\bm{X})$ is a strong single-index model if $R^2$ is large. This can be true for any model $\Psi(\bm{X})$, as we allow $\varepsilon_{\bm{X},T}$ to depend on $\bm{X}$. However, a pure single index model is a situation where $\varepsilon_{\bm{X},T}=\varepsilon_T$ only depends on $\bm{X}$ through $T$. In that case, it is easy to see that $\mathbb{E}(\Psi(\bm{X})\mid T)=m(T)$, so that overall the random variable $\Psi(\bm{X})$ depends on $\bm{X}$ only through $T$. However, we do not impose the assumption of a pure single index model. Readers are referred to \cite{powellstockstoker1989}, \cite{hardlehallichimura1993} and \cite{ichimura1993} for more information on single-index models.

Based on the representation of $\Psi(\bm{X})$ and using the law of total variance, we can write
\begin{align}\label{eq:SIS:vardecomp}
\operatorname{Var}(\Psi(\bm{X}))= \operatorname{Var}(m(T)) + \mathbb{E}(v^2(T)) = \operatorname{Var}(m(T)) + \operatorname{Var}(\varepsilon_{\bm{X},T}),
\end{align}
since $\mathbb{E}(v^2(T))=\operatorname{Var}(\varepsilon_{\bm{X},T})-\operatorname{Var}(\mathbb{E}(\varepsilon_{\bm{X},T}\mid T)) = \operatorname{Var}(\varepsilon_{\bm{X},T})$.  We see that~\eqref{eq:SIS:vardecomp} decomposes the variance of $\Psi(\bm{X})$ into two pieces: the one of the (random) systematic part, $m(T)$ and the unsystematic error $\varepsilon_{\bm{X},T}$ of the model. Note that~\eqref{eq:SIS:vardecomp} holds irrespective of wether we have a pure single index model or not.

In addition to applying IS on $T$, we also propose to use stratification on $T$ to further reduce the variance; it will turn out that this essentially ``stratifies away'' $\operatorname{Var}(m(T))$, the variance of the systematic part of the model. More precisely, let $\Omega_{f}=(t_{\inf},t_{\sup})$ where possibly $t_{\inf}=-\infty$ and $t_{\sup}=\infty$. The SSIS scheme splits $\Omega_{f}$ into $n$ strata of equal probability under $g$ and draws one sample of $T$ from each stratum. Our estimator becomes
\begin{align*}
\hat{\mu}^{\text{\tiny{SSIS}}}_n = (1/n) \sum_{i=1}^n \Psi(\bm{X}_i) w(T_i),\quad T_i=G_T^\i(U_i),\quad U_i\sim \operatorname{U}( (i-1)/n, i/n),
\end{align*}
and, as before, $\bm{X}_i \omu{\text{\tiny{ind.}}}{\sim}{} F_{\bm{X}\mid T}(\cdot \mid T=T_i)$ for $i=1,\dots,n$.

For our variance analysis below, it is useful to find an expression for $\operatorname{Var}(\hat{\mu}^\text{\tiny{MC}}_n)$. Note that the conditional moment functions $m^{(k)}$ do not depend on wether we sample from $f_T$ or $g_T$. From~\eqref{eq:SIS:vardecomp} and the fact that  $\operatorname{Var}(m(T))=\mathbb{E}(m(T))^2- \mu^2$ as well as $\mathbb{E}(v^2(T)) = \mathbb{E}(m^{(2)}(T))-\mathbb{E}(m(T))^2$, we find

\begin{align}\label{eq:var:mu:MC}
n \operatorname{Var}(\hat{\mu}^\text{\tiny{MC}}_n) = \operatorname{Var}(m(T))+\mathbb{E}(v^2(T)) = \mathbb{E}(m^{(2)}(T))-\mu^2.
\end{align}

As should be clear from the form of our estimators, their bias depends on the support $\Omega_{g}$ of $g_T$. We define
\begin{align*}%
\mu_{\text{\tiny{SIS}}} = \int_{\Omega_g} m(t)f_T(t)\;\mathrm{d} t, \quad \sigma_{\text{\tiny{SIS}}}^2=\int_{\Omega_g} m^{(2)}(t) \frac{f_T^2(t)}{g_T(t)}\;\mathrm{d} t  - \mu_{\text{\tiny{SIS}}}^2, \quad \sigma_{\text{\tiny{SSIS}}}^2=\int_{\Omega_g} v^{2}(t) \frac{f_T^2(t)}{g_T(t)}\; \mathrm{d} t.
\end{align*}
Notice that $\mu_{\text{\tiny{SIS}}}$ depends on $g_T$ through the region $\Omega_{g}$. The SIS and SSIS estimators are unbiased only if $g_T$ is such that $g_T(t)>0$ whenever $m(t)f_T(t)>0$, but we do not impose this unbiasedness assumption on $g_T$.

\subsection{Optimal densities}

We are now able to derive properties of the (S)SIS estimators and derive the optimal (variance-minimizing) proposal distribution of $g_T$; see the appendix for the proofs. As the objective of our IS techniques is variance reduction, we call the practice of setting $g_T$ to its optimal density or their approximation as \emph{optimal calibration}, and the resulting methods $\operatorname{SIS}^*$ and  $\operatorname{SSIS}^*$.

\begin{proposition}[Variance-optimal SIS]\label{prop:IS}
We have $\mathbb{E}(\hat{\mu}^{\text{\tiny{SIS}}}_n)=\mu_{\text{\tiny{SIS}}}$ and $\operatorname{Var}(\hat{\mu}^{\text{\tiny{SIS}}}_n)=\sigma_{\text{\tiny{SIS}}}^2/n$. If $\mathbb{E}_g(m^2(T)w^2(T)) < \infty$, then $\sqrt{n} (\hat{\mu}^{\text{\tiny{SIS}}}_n-\mu_{\text{\tiny{SIS}}}) \omu{\text{\tiny{d}}}{\rightarrow}{} \operatorname{N}(0,\sigma_{\text{\tiny{SIS}}}^2)$ as $n\rightarrow\infty$.

Suppose that $\Psi(\bm{x}) \geq 0$ or $\Psi(\bm{x}) \leq 0 $ for all $\bm{x} \in \Omega_{\bm{X}}$. The density $g_T$ that gives an unbiased SIS estimator with the smallest variance is
	\begin{align}\label{eq:IS:gopt}
	g_T^{\text{\tiny{opt}}}(t)= c^{-1} \sqrt{m^{(2)}(t)} f_{T}(t),
	\quad t \in (t_{\inf},t_{\sup}),\quad c = \int_{t_{\inf}}^{t_{\sup}} \sqrt{m^{(2)}(t)} f_{T}(t)\; \mathrm{d} t.
	\end{align}
The variance of the optimal SIS estimator, denoted by $\hat{\mu}^\text{\tiny{SIS,opt}}_n$, is $\operatorname{Var}(\hat{\mu}^\text{\tiny{SIS,opt}}_n)=(c^2 - \mu^2)/n$.
\end{proposition}

\begin{remark}\label{rem:optIS}
\begin{enumerate}
\item Proposition~\ref{prop:IS} implies that using optimal SIS gives variance no larger than MC. Indeed, by Jensen's inequality, $n\operatorname{Var}(\hat{\mu}^\text{\tiny{SIS,opt}}_n) \leq \mathbb{E}(m^{(2)}(T))-\mu^2$, which is equal to  $\operatorname{Var}(\hat{\mu}^\text{\tiny{MC}}_n)$ using~\eqref{eq:var:mu:MC}. This inequality holds as an equality only when $m^{(2)}(t)$ is constant for all $t \in \Omega_{T}$.
\item If $R^2 = 1$ (corresponding to the strongest possible single index structure), then $\operatorname{Var}(\hat{\mu}^\text{\tiny{SIS,opt}}_n)=0$:  SIS provides a zero-variance estimator if $m^{(2)}(t)=(m(t))^2$ for all $t$, which is equivalent to having $v^2(t)=0$ for all $t$, or equivalently, to having $\mathbb{E}(v^2(T))=0$ since $v^2(t) \ge 0$ for all $t$. This is the same as asking $\operatorname{Var}(m(T))/\operatorname{Var}(\Psi(\bm{X}))=R^2=1$. This is why choosing a function $T$ such that the model is an as good fit as possible is important for the SIS method to achieve significant variance reduction.
\end{enumerate}
\end{remark}

The following proposition gives the properties of the SSIS estimator and the optimal (variance-minimizing) proposal distribution of $g_T$. Its proof is in the appendix.
\begin{proposition}[Variance-optimal SSIS]\label{prop:SIS}
It holds that $\mathbb{E}(\hat{\mu}^{\text{\tiny{SSIS}}}_n)=\mu_{\text{\tiny{SIS}}}$ and, for large enough $n$, $\operatorname{Var}(\hat{\mu}^{\text{\tiny{SSIS}}}_n)=\sigma_{\text{\tiny{SIS}}}^2/n + o(1/n)$. If $\mathbb{E}_g \left(\left|m(T)w(T)\right|^{2+\delta}\right) < \infty$ for some $\delta>0$, $\hat{\mu}^{\text{\tiny{SSIS}}}_n$ is asymptotically normal as $\sqrt{n} (\hat{\mu}^{\text{\tiny{SSIS}}}_n-\mu_{\text{\tiny{SIS}}}) \omu{\text{\tiny{d}}}{\rightarrow}{} \operatorname{N}(0, \sigma_{\text{\tiny{SIS}}}^2)$ for $n\rightarrow\infty$.
Suppose that $\Psi(\bm{x}) \geq 0$ or $\Psi(\bm{x}) \leq 0$ for all $\bm{x} \in \Omega_{\bm{X}}$ and that $\P_f(v^2(T)=0, \; m(T) \neq 0)=0$.
The density $g_T$ that gives an unbiased SSIS estimator with the smallest variance is
	\begin{align}\label{eq:SIS:gopt}
	g_T^{\text{\tiny{opt,s}}}(t)=c^{-1}v(t) f_{T}(t), \quad t \in (t_{\inf},t_{\sup}), \quad c=\int_{t_{\inf}}^{t_{\sup}} v(t) f_{T}(t) \;\mathrm{d} t.
	\end{align}
The variance of the optimal SSIS estimator $\hat{\mu}^\text{\tiny{SSIS,opt}}_n$ is $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n)=c^2/n+o(1/n)$. If $\P_f(v^2(T)=0, \; m(T) \neq 0)>0$, then $\hat{\mu}^\text{\tiny{SSIS,opt}}_n$ is biased.
\end{proposition}

\begin{remark}
\begin{enumerate}
\item Proposition~\ref{prop:SIS} implies that using optimal SSIS gives asymptotically a variance no larger than MC. Indeed, Jensen's inequality implies that we have $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n) \leq (1/n) \mathbb{E}(v^2(T)) + o(1/n)$ with equality only if $v(t)$ is constant for all $t \in \Omega_T$. From~\eqref{eq:var:mu:MC} (and ignoring the $o(1/n)$ term), this means $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n) \le \operatorname{Var}(\hat{\mu}^\text{\tiny{MC}}_n)$, with equality only if $v(t)$ is constant for all $t \in \Omega_T$ and $\operatorname{Var}(m(T))=0$, which is unlikely to be the case since $m(T)$ has been chosen specifically such that $R^2\approx 1$.
\item If $R^2 = 1$ (strongest possible single index structure), then $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n) =0$, since $\operatorname{Var}(\hat{\mu}^{\text{\tiny{SSIS}}}_n)=0$ iff $m^{(2)}(t)=(m(t))^2$ for all $t$, or equivalently $v^2(t)=0$ for all $t$ and thus $\mathbb{E}(v^2(T))=0$, which means $R^2=1$.
\item Unless $m(t)=0$, SSIS achieves variance reduction compared to SIS, as $\operatorname{Var}(\hat{\mu}^{\text{\tiny{SSIS}}}_n) \leq \operatorname{Var}(\hat{\mu}^{\text{\tiny{SIS}}}_n)$ for the same choice of $g_T$. This in turn implies that $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n) \leq \operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n)$.\label{eq:SISbetterIS}
The proposal densities $g_T^{\text{\tiny{opt}}}$ and $g_T^{\text{\tiny{opt,s}}}$ defined in~\eqref{eq:IS:gopt} and~\eqref{eq:SIS:gopt} give estimators with smallest variance if $\Psi(\bm{x}) \lesseqgtr 0$ for all $\bm{x} \in \Omega$, which holds for many applications in finance (e.g., when $\Psi$ is an indicator and thus $\mu$ a probability or when $\Psi$ is the payoff of an option).
If $\Psi$ takes both positive and negative values, $m(t)$ could be 0 for some values of $t$. We can then improve the optimal calibration by setting $g_T(t)=0$ whenever $m(t)=0$. Since it is generally unknown and hard to estimate which values of $t$ give $m(t)=0$, this improvement may not be implementable.
\item The expression for $\operatorname{Var}(\hat{\mu}^\text{\tiny{SSIS,opt}}_n)$ implies that $\operatorname{SSIS}^*$ ``stratifies away'' the variance captured by the systematic part $m(T)$ of the single-index model, so the variance of the  $\operatorname{SSIS}^*$ estimator comes only from the error term $\varepsilon_{\bm{X},T}$ via $v(t)$. If $g_T$ is not chosen optimally, then $\operatorname{Var}(\hat{\mu}^{\text{\tiny{SSIS}}}_n) = \sigma_{\text{\tiny{SIS}}}^2/n + o(1/n)$ shows that we still make $\operatorname{Var}(m(T))$ vanish by using stratification, but the contribution from $v^2(T)$ might be amplified (compared to how it contributes to the MC estimator's variance) if we do not choose a good proposal density. Irrespective of the choice of $g_T$ it is true that the stronger the fit of the single index model, the better (S)SIS works.
\item These results show that as long as the problem at hand has a strong single-index structure and sampling from $T$ and $\bm{X}\mid T$ is feasible, SIS and SSIS can be applied and should give large variance reduction. As those conditions do not assume a specific form for $\Psi$ or for the distribution of $\bm{X}$, SIS and SSIS are applicable to a wide range of problems.
\end{enumerate}
\end{remark}

Proposition~\ref{prop:SIS} asserts the asymptotic normality of the SSIS estimator. In order to construct a confidence interval from this estimator, we must estimate $\sigma_{\text{\tiny{SSIS}}}^2$. We take an approach similar to the one by \cite{wangbrowncailevine2008} where the first-order difference of samples are taken to remove the effect of the mean function. Its proof is in the appendix.

\begin{proposition}[Estimation of $\sigma_{\text{\tiny{SSIS}}}^2$]\label{prop:SISvar:est}
Let $G_T$ be the distribution function corresponding to $g_T$.
	If $G^{-1}_T$, $m$ and $v^2$ are continuously differentiable over the domain of $T$ under the proposal distribution, then
	\begin{align*}
	\hat{\sigma}_{\text{\tiny{SSIS}}}^2 = \frac{1}{2(n-1)}\sum\limits_{i=1}^{n-1} r_i^2 w^2(T_i)
	\end{align*}
	is a consistent estimator of $\sigma_{\text{\tiny{SSIS}}}^2$, where $r_i= \Psi(\bm{X}_{i+1}) - \Psi(\bm{X}_i)$ for $i=1,\ldots,n-1$.
\end{proposition}

Proposition~\ref{prop:SISvar:est} assumes that $G^{-1}_T$ is continuously differentiable which requires that $g_T(t)>0$ on the support of $T$ under the proposal distribution. This does not hold if there exist intervals where $g_T(t)=0$. In such a situation, we propose to divide the support of $T$ into disjoint intervals with $g_T(t)>0$ then apply Proposition~\ref{prop:SISvar:est} separately to each interval and combine them to obtain $\hat{\sigma}_{\text{\tiny{SSIS}}}^2$.

\subsection{Connection to other IS and SS techniques}

In this subsection, we explain some connections of our proposed methods to other IS and SS techniques.

Suppose that $\bm{X} \sim \operatorname{N}_d(\bm{0}, I_d)$. A popular strategy for constructing a proposal distribution under the multivariate normal (MVN) model is to shift its mean vector of $\bm{X}$, that is, letting $\bm{X} \sim \operatorname{N}_d(\bm{\eta}, I_d)$ under the IS distribution for some $\bm{0} \neq \bm{\eta} \in \mathbb{R}^d$.
The following proposition states that this type of IS can be achieved within our SIS framework by using $T(\bm{X})= \bm{\theta}^{\top}\bm{X}$ where $\bm{\theta}$ is the normalized version of $\bm{\eta}$. Based on Proposition~\ref{prop:IS} and Remark~\ref{rem:optIS}, this result thus implies that this popular mean-shifting strategy for MVN models works well if the problem has a strong linear single-index structure based on the specific choice of shift vector $\bm{\eta}$.

\begin{proposition}[SIS in MVN models]\label{prop:meanshift}
Let $\bm{X} \sim \operatorname{N}_d(\bm{0}, I_d)$ under the original distribution. Fix $\bm{0} \neq \bm{\beta} \in \mathbb{R}^d$ with $\bm{\beta}^{\top}\bm{\beta}=1$.
Consider SIS with $T(\bm{X})= \bm{\beta}^{\top}\bm{X}$. If $g_T$ is the density of $\operatorname{N}(c,\sigma^2)$, then $\bm{X} \sim \operatorname{N}_d(c\bm{\beta}, I_d + (\sigma^2-1)\bm{\beta}\bbeta^{\top})$ in the IS scheme.
\end{proposition}

Proposition~\ref{prop:meanshift} implies that $\bm{X} \sim \operatorname{N}_d(c\bm{\beta}, I_d)$ if $g_T$ is chosen as the $\operatorname{N}(c, 1)$ density (where we recall that the original distribution $f_T$ is $\operatorname{N}(0,1)$), so that the previously mentioned mean-shifting strategy is a special case of IS (namely, by merely shifting the mean of $T$ instead of applying $\operatorname{SIS}^*$). If $\operatorname{Var}(T)\ne 1$ under $g$, the dependence structure of the components in $\bm{X}$ does change in the IS scheme.

The stratification technique proposed in \cite{glassermanheidelbergershahabuddin1999} is applied by using the normalized shift vector as the stratification direction and can also be achieved within our SIS framework using the same function $T$ and proposal distribution as in Proposition~\ref{prop:meanshift}. The combination of IS and SS is not motivated as in \cite{glassermanheidelbergershahabuddin1999}. In the latter reference, IS and SS are used to remove the variability due to the linear and the quadratic part, respectively, of $\Psi(\bm{X})$. In SSIS, SS is used to eliminate $\operatorname{Var}(m(T))$, the variance captured by the systematic part of the single-index model, and then IS is used to minimize the variance contribution from $\varepsilon_{\bm{X},T}$.

It is easy to see that the NPIS method proposed by \cite{neddermeyer2011} with $u=1$ (where $u$ is defined as in \cite{neddermeyer2011}) is closely connected to SIS with $T(\bm{X})=X_1$. It is proposed to choose $g_T(t)= m(t)f_T(t)/\mu$ in \cite{neddermeyer2011}, but by Proposition~\ref{prop:IS}, choosing $g_T^{\text{\tiny{opt}}}$ defined in \eqref{eq:IS:gopt} gives an IS estimator with a smaller variance.

SIS also generalizes the IS method in \cite{arbenzcambouhofertlemieuxtaniguchi2018} in two ways. First, SIS generalizes the form of the transformation function $T$, that is, it does not assume any specific form of $T$, while the IS method in \cite{arbenzcambouhofertlemieuxtaniguchi2018} assumes that $T(\bm{X}) = \max \{F_1(X_1),\dots,F_d(X_d)\}$, where $F_1,\dots,F_d$ are the marginal distribution functions of $\bm{X}$. Secondly, SIS generalizes the form of the proposed density of the transformed variable, whereas the proposal density $g_T$ for the IS method in \cite{arbenzcambouhofertlemieuxtaniguchi2018}  has the form
	\begin{align*}
	g_{T}(t) = \sum_{k=1}^{M} q_k f_{T}(t \mid T>\lambda_k)
	=\sum_{k=1}^{M} q_k \frac{f_{T}(t)I_{\{t>\lambda_k\}}}{1-F_T(\lambda_k)},
	\end{align*}
for some $M \geq 1$, $t_{\inf}=\lambda_1 < \cdots < \lambda_{M}$, and $q_1,\ldots,q_M \geq 0$ such that $\sum_{k=1}^{M} q_k=1$.

The single-index structure we exploit to design our SIS and SSIS schemes is strongly related to the idea of conditional MC. In both cases, the goal is to identify a function $T$ of $\bm{X}$ that explains much of the variability of $\Psi(\bm{X})$. However, with conditional MC one typically also chooses $T$ so that $m(t)=\mathbb{E}(\Psi(\bm{X})\mid T(\bm{X})=t)$ is known, and then estimates $\mu$ by the sample mean of the $m(T_i)$, $i=1,\ldots,n$. In our case, we do not assume or need this conditional expectation to be known in closed-form. This means we typically do not completely get rid of the $\operatorname{Var}(m(T))$ term in~\eqref{eq:SIS:vardecomp}, but we aim to reduce it via IS; if SSIS is applied optimally, we actually do make $\operatorname{Var}(m(T))$ vanish.

\subsection{Single-Index Importance Sampling and QMC}\label{sec:qmc:IS}

As mentioned in the introduction, further variance reduction can be achieved by performing the simulation based on quasi-random numbers (QRNs) instead of PRNs. Suppose we are given a sampling algorithm $\phi : [0,1)^{d+k} \rightarrow \mathbb{R}^d$ for some $k \geq 0$ such that
$\phi(\bm{U}) \sim f_{\bm{X}}$ for $\bm{U} \sim \operatorname{U}[0,1)^{d+k}$. For instance, when $\bm{X}\sim \operatorname{N}_d(\bm{\mu}, \Sigma)$, then $k=0$ and $\phi(\bm{u})=\bm{\mu}+C (\Phi^{-1}(u_1),\ldots,\Phi^{-1}(u_d))^{\top}$, where the matrix $C$ is such that $CC^{\top} = \Sigma$ and $\Phi(x)=\int_{\infty}^x (2\pi)^{-0.5} \exp(-t^2/2)\;\mathrm{d} t$ is the distribution function of the standard normal distribution. For a discussion of what the function $\phi$ is in a more general context, where $\bm{X}$ has a dependence structure modelled by a copula other than the Gaussian copula, we refer to \cite{cambouhofertlemieux2016}.
With $\phi$ at hand, we can write $\hat{\mu}^\text{\tiny{MC}}_n=(1/n)\sum_{i=1}^n \Psi(\phi(\bm{U}_i))$ where $\bm{U}_i\omu{\text{\tiny{ind.}}}{\sim}{}\operatorname{U}(0,1)^{d+k}$. With QMC, we replace the $\bm{U}_i$ with deterministic vectors $\bm{v}_i\in[0,1)^{d+k}$ that fill the unit hypercube more evenly.  A number of constructions for such points have been proposed (see e.g., \cite[Ch.~5]{lemieux2009}); we use the Sobol' sequence of  \cite{sobol1967} for our numerical examples later on.
In order to obtain an easy-to-compute error bound, we apply a random digital shift to the $\bm{v}_i$ to obtain multiple independent and identically distributed realizations of the randomized QMC (RQMC) estimator. Based on the digitally-shifted RQMC estimates, we can compute a probabilistic error bound in the form of a confidence interval.

It is widely accepted that the performance of QMC is largely influenced by the effective dimension of the problem, a concept first introduced in \cite{caflischrusselmorokoffowen1997}. More precisely, QMC works significantly better than plain MC if the problem has a low effective dimension; see also \cite{wangfang2003, wangsloan2005, wang2006}. One notion of effective dimension is the truncation dimension; see \cite{wangsloan2005}. Essentially, a problem has a low truncation dimension when only a small number of leading input variables are important. Recall that $\bm{X}$ is sampled indirectly in SIS, that is, $T$ is generated first then $\bm{X}$ is drawn from $F_{\bm{X} | T}$. Assuming $T$ is generated using the inversion method and via the first coordinate $u_1$ of $\bm{u} \in [0,1)^{k+d}$, the indirect sampling step of SIS transforms the problem in such a way that the first input variable accounts for $R^2\cdot100\%$ of the variance of $\Psi(\bm{X})$, where $R^2=\operatorname{Var}(m(T))/\operatorname{Var}(\Psi(\bm{X}))$. That is, the problem has a truncation dimension of 1 in proportion $R^2$ under SIS.
Therefore, if the fit of the single-index model is good, say $R^2>0.9$, the indirect sampling step via $T$ serves as a dimension reduction technique and enhances the efficiency of QMC.

\section{Calibration stage in practice}\label{sec:calibration}

As mentioned in the introduction, we must estimate the optimal transformation function $T=T(\bm{X})$ and construct an approximation $\hat{g}_T^{\text{\tiny{opt}}}$ for the optimal density $g_T^{\text{\tiny{opt}}}$ before applying (S)SIS. We call the stage in which these two tasks are performed the \emph{calibration stage}. Furthermore, the calibrations in \eqref{eq:IS:gopt} and~\eqref{eq:SIS:gopt} require the knowledge of the conditional mean function and variance function, respectively. As these are rarely known in practice, they must be estimated in the calibration stage as well.

\subsection{Estimating the optimal transformation $T$}
In what follows, we assume that $T$ is a linear function of the components in $\bm{X}$, i.e., $T=\bm{\beta}^{\top}\bm{X}$ for some $\bm{\beta}\in\mathbb{R}^d$; note that if $\bm{X}$ is multivariate normal, then $T$ is univariate normal and sampling from $\bm{X}\mid T$ is straightforward. To find $\bm{\beta}$ that maximizes $R^2$, we use the average derivative method of \cite{stoker1986}, which essentially allows us to estimate $\bm{\beta}$ as if we met the assumptions of a linear regression. That is, we sample independent realizations $\Psi(\bm{X}_i)=:\Psi_i$ for $i=1,\dots,n_1$ (say, $n_1=1000$) and compute the sample covariance matrix $\Sigma_{\bm{X},\bm{X}}$ as well as the sample cross covariance of $\bm{X}_1,\dots,\bm{X}_{n_1}$ and $(\Psi_1,\dots,\Psi_{n_1})$, say $\Sigma_{\bm{X},\Psi}$ to obtain

$$\hat{\bm{\beta}} = \Sigma_{\bm{X},\bm{X}}^{-1} \Sigma_{\bm{X},\Psi}.$$

In some applications, we may use only a subset of the components in $\bm{X}$; in later examples, for instance, we only use the systematic risk factors in a credit model to build our transformation $T$. Sometimes one may even not need to estimate $\bm{\beta}$, for instance, if it is clear that the $d$ components in $\bm{X}$ are equally important, one can simply set $\bm{\beta} = (1/\sqrt{d},\dots,1/\sqrt{d})$; see Section~\ref{section:credit:gauss} for an example.

\subsection{Finding the optimal density}

The calibration in~\eqref{eq:IS:gopt} requires the knowledge of the conditional second moment function $m^{(2)}(t) = \mathbb{E}(\Psi^2(\bm{X})  \mid T=t)$ for all $t\in \Omega_T$, which, of course, is not known; similarly, the conditional variance function $v^2$ required for the calibration in~\eqref{eq:SIS:gopt} is not known either. We now describe how to calibrate~\eqref{eq:IS:gopt} in practice; the calibration of~\eqref{eq:SIS:gopt} can be done similarly.

Our first ingredient is the construction of an estimate of $m^{(2)}(t) = \mathbb{E}(\Psi^2(\bm{X})  \mid T=t)$ for all $t\in \Omega_T$; we suggest using plain MC for this purpose. To this end, let $t_1<\dots<t_M$ be knots at which the function $m^{(2)}$ is to be estimated (e.g., $M=20$ equally spaced points in the relevant range). Choose some small pilot sample size $n_{\text{\tiny{pilot}}}$ (for example, 5\% of the total sample size $n$). For each $t_j$, sample $n_{\text{\tiny{pilot}}}$-many realizations from $\bm{X} \mid T=t_j$ and estimate $m^{(2)}(t_j)$ by its empirical equivalent for $j=1,\dots,M$. Then utilize smoothing splines (see, for example, \cite{reinsch1967}) and only those $t_j$ associated with a positive estimate to construct an estimate $\hat{m}^{(2)}$ for all $t\in \Omega_T$; for those $t$ where $\hat{m}^{(2)}(t)\leq 0$, one can either leave them as $\hat{m}^{(2)}(t)=0$ (which may lead to bias as discussed below) or set $\hat{m}^{(2)}$ to be some positive function (e.g., the error function) that resembles the lower tail of $\varepsilon$.

Having constructed an estimate for $m^{(2)}$,  we can set $\hat{g}_T^{\text{\tiny{opt}}}\propto \sqrt{\hat{m}^{(2)}(t)}f(t)$ for $t\in\mathbb{R}$. However, $\hat{g}_T^{\text{\tiny{opt}}}$ rarely belongs to known parametric families of distributions that are easily sampled from. One can use numerical techniques such as the NINIGL algorithm to approximate the quantile function of a distribution given its unnormalized density; see \cite{hormannleydold2003}. This approach, however, has three drawbacks: i) sampling from a numerically constructed density is time-consuming and can be prone to numerical problems; ii) the normalizing constant needs to be estimated, and iii) bias can occur when $\hat{g}_T^{\text{\tiny{opt,s}}}$ does not have the same support as $g_T^{\text{\tiny{opt,s}}}$, which in turn happens when $\hat{m}^{(2)}(t)=0$ even though $m^{(2)}(t)\not=0$ for some set $D$ with $\int_D f(t)\;\mathrm{d} t>0$.

The third drawback can be alleviated if we can define $\hat{m}^{(2)}(t)$ to be positive whenever $m^{(2)}(t)$ is (for example, by assuming some lower and upper tail behaviour). Furthermore, recall from Proposition~\ref{prop:SIS} that \eqref{eq:SIS:gopt} gives a biased estimator if $\P_f(v^2(T)=0, \; m(T) \neq 0)>0$ which in some cases can be debiased. For instance, if $v(t)>0$ for all $t\in\Omega_t$, but the estimated $\hat{v}(t)=0$ for $t\geq t_{\max}$ for some $t_{\max}\in\mathbb{R}$ and $m(t)=c$ for some constant $c$ for $t\geq t_{\max}$ (for instance, if $\mu$ is a probability, then typically $m(t)=c=1$ for $t\geq t_{\max}$). If $\hat{\mu}^{\text{\tiny{SSIS}}}_n$ is constructed using $\hat{v}$, we find
\begin{align*}
\mathbb{E}(\hat{\mu}^{\text{\tiny{SSIS}}}_n) &= \int_{-\infty}^{t_{\max}} m(t)f_T(t)\;\mathrm{d} t = \mu - \int_{t_{\max}}^{\infty} m(t)f_T(t)\;\mathrm{d} t \approx \mu - c\P_f(T>t_{\max});
\end{align*}
$\hat{\mu}^{\text{\tiny{SSIS}}}_n$ can therefore be debiased by adding $c\P_f(T>t_{\max})$.

The second drawback can be addressed by using weighted IS (so that the normalizing constant cancels out); see \cite[Section~4.5]{lemieux2009}. Alternatively, the normalizing constant can be estimated as follows: Let $\hat{g}_{T,u}^{\text{\tiny{opt}}}(t)= \sqrt{\hat{m}^{(2)}}g(t)$ denote the unnormalized density, and $T_1,\dots,T_n\omu{\text{\tiny{ind.}}}{\sim}{} \hat{g}_T^{\text{\tiny{opt}}}$ (obtained, for instance, using the NINIGL algorithm). Now construct an estimate of the density of $T_1,\dots,T_n$, such as the kernel density estimator, and denote this estimated density by $\hat{h}$; note that $\hat{h}$ is normalized and that each of $\hat{h}(T_i)/\hat{g}_{T,u}^{\text{\tiny{opt}}}(T_i)$ for $i=1,\dots,n$ is an estimator for the normalizing constant. As such, we suggest using the sample median of $\{\hat{h}(T_1)/\hat{g}_{T,u}^{\text{\tiny{opt}}}(T_1),\dots,\hat{h}(T_n)/\hat{g}_{T,u}^{\text{\tiny{opt}}}(T_n) \}$ as an estimator for the normalizing constant.

The first drawback, that is, the construction of an approximation to the quantile function of $\hat{g}_T^{\text{\tiny{opt}}}$ being both slow and potentially prone to numerical problems, is most severe. Below, we propose an alternative method, namely by setting $\hat{g}_T^{\text{\tiny{opt}}}(t) = 1/\sigma f( (t-k)/\sigma)$ for carefully chosen $k\in\mathbb{R}$ and $\sigma>0$. In other words, we suggest using a location-scale transform of the original density as proposal density and will therefore call this method $\operatorname{SIS}^{c,\sigma}$. While this procedure does require estimation of $k$ and $\sigma$, it does not suffer from any of the three aforementioned problems: i) if we can sample from $f$, we can also sample from $f( (t-k)/\sigma)/\sigma$; ii) there is no normalizing constant or density to be estimated; iii) $f$ and $f( (t-k)/\sigma)/\sigma$ have the same support, so that the resulting estimator is unbiased.

The idea behind using a location-scale transform arises from the observation that in many practical examples (as will be seen later) the optimal density has roughly the same shape as the original density. As such, we try to find $k$ and $\sigma$ so that $1/\sigma f( (t-k)/\sigma)$ is approximately $g_T^{\text{\tiny{opt}}}(t)$. Denote again by $\hat{g}_{T,u}^{\text{\tiny{opt}}}(t)= \sqrt{\hat{m}^{(2)}(t)}f(t)$ the unnormalized, estimated optimal density and assume that the mode of $f_T$ is at zero (otherwise, shift accordingly).  Now find $k^* = \operatorname*{argmax}_t \hat{g}_{T,u}^{\text{\tiny{opt}}}(t)$ numerically; this makes sure that the theoretical and approximated densities have (roughly) the same mode, thereby both sample from the ``important region''. Having estimated $k^*$, the next step is to compute $\sigma$ such that it minimizes the variance of the resulting estimator. More precisely, given a sample $T_1,\dots,T_{n_{\text{\tiny{pilot}}}}$ from $f$,
we can estimate the variance of the estimator for a given $\sigma$ as follows: Set $\tilde{T}_i=k^* + \sigma T_i$ and $w_i =\frac{f(\tilde{T}_i)}{f( (\tilde{T}_i-k^*)/\sigma)/\sigma}$ and sample $\bm{X}_i \mid \tilde{T}_i$ for $i=1,\dots,n_{\text{\tiny{pilot}}}$. The second moment of the IS estimator (written as a function of the scale $\sigma$) is then
\begin{align}\label{eq:Vsigma}
 V(\sigma) =  \sum_{i=1}^{n_{\text{\tiny{pilot}}}} \Psi(\bm{X}_i) w_i^2, \quad \sigma>0.
 \end{align}
We can now solve $\sigma^* = \operatorname*{argmin}_{\sigma>0} V(\sigma)$ numerically. Note that due to the nature of a location-scale transform, we only need to sample $T_1,\dots,T_{n_{\text{\tiny{pilot}}}}$ once. Intuitively, $k^*$ shifts the density to the important region, while $\sigma^*$ scales it appropriately. If computing $V(\sigma)$ is very time consuming (for example, when the sampling of $\bm{X} \mid T$ is complicated), one can set $\sigma^*=1$; the resulting method is then called $\operatorname{SIS}^{\mu}$ instead of $\operatorname{SIS}^{\mu,\sigma}$.

\begin{algorithm}[Calibration and estimation stage for estimating $\mu$ via $\operatorname{SIS}^{\mu,\sigma}$]\label{alg:SIS:full}
Given knots $t_1,\dots,t_{n_{\text{\tiny{pilot}}}}$, a total pilot budget $n_{\text{\tiny{tot}}}$ and knot-sample size $n_{\text{\tiny{knot}}}$, target sample size $n$, estimate $\mu$ via:
\begin{enumerate}

\item \emph{Estimation of the direction vector.}
\begin{enumerate}
\item Sample $\bm{X}_i\omu{\text{\tiny{ind.}}}{\sim}{} f_{\bm{X}}$ for $i=1,\dots,n_{\text{\tiny{pilot}}}$ and compute $\Psi(\bm{X}_i)=:\Psi_i$, $i=1,\dots,n_{\text{\tiny{pilot}}}$.
\item Compute  $\Sigma_{\bm{X},\bm{X}}$ and $\Sigma_{\bm{X},\mathbf{\Psi}}$and set $\hat{\bm{\beta}} = \Sigma_{\bm{X},\bm{X}}^{-1} \Sigma_{\bm{X},\Psi}$.
\end{enumerate}

\item \emph{Estimation of $c^*$ and $\sigma^*$.}
\begin{enumerate}
\item\label{step:condsampling1}  For each $k=1,\dots,n_{\text{\tiny{pilot}}}$, sample $\bm{X}_{j,k}\omu{\text{\tiny{ind.}}}{\sim}{} f_{\bm{X}\mid T}(\cdot \mid t_k)$ for $j=1,\dots,n_{\text{\tiny{knot}}}$.
\item Utilize smoothing splines\footnote{In the case when $\Psi$ is an indicator, use a logistic regression (available, for instance, via the \textsf{R}\ function \texttt{glm())} with $n_{\text{\tiny{knot}}} = 1$ instead.} through  $(t_k, (1/n_{\text{\tiny{knot}}})\sum_{j=1}^{n_{\text{\tiny{knot}}}} \Psi(\bm{X}_{j,k})^2)$, $k=1,\dots,n_{\text{\tiny{pilot}}}$, to construct an estimate for $\hat{m}^{(2)}(t)$ for $t\in\mathbb{R}$.
\item Find $c^* = \operatorname*{argmax}_t \sqrt{\hat{m}^{(2)}(t)} f(t)$ numerically.
\item\label{step:condsampling2} Sample $T_1,\dots,T_{n_{\text{\tiny{pilot}}}}\omu{\text{\tiny{ind.}}}{\sim}{} f$ and find $\sigma^* = \operatorname*{argmin}_{\sigma>0} V(\sigma)$ with the function $V$ from~\eqref{eq:Vsigma} numerically.
\end{enumerate}

\item \emph{Estimation of $\mu$.}
\begin{enumerate}
\item Sample $T_1',\dots,T_n'\omu{\text{\tiny{ind.}}}{\sim}{} f$, set $T_i = c^* + \sigma^* T_i$ and compute $w_i =\frac{f(T_i)}{ f( (T_i-c^*)/\sigma^*)/\sigma^*}$ for $i=1,\dots,n$.
\item\label{step:condsampling3}  Sample $\bm{X}_i\omu{\text{\tiny{ind.}}}{\sim}{} f_{\bm{X}\mid T}(\cdot \mid T_i)$ for $i=1,\dots,n$.
\item Return $\hat{\mu}^{\text{\tiny{SIS}}}_n = (1/n) \sum_{i=1}^n \Psi(\bm{X}_i)w_i$.
\end{enumerate}

\end{enumerate}
\end{algorithm}

\begin{remark}
\begin{enumerate}
\item Algorithm~\ref{alg:SIS:full} can be easily adapted to accommodate quasi-random numbers and stratification, as will be discussed in the next section.
\item The effort for the conditional sampling needed in Steps~\ref{step:condsampling1}, \ref{step:condsampling2} and~\ref{step:condsampling3} is problem specific -- for some problems, samples of $\bm{X} \mid T=t_1$ can be easily transformed to samples from $\bm{X} \mid T=t_2$ for $t_1\not=t_2$, making these steps very fast; in some other problems, the conditional sampling is more involved.
\item Our proposed SIS method can also be combined with other VRTs. For instance, in Section~\ref{section:credit:t}, we combine conditional MC (CMC) and SIS to estimate loss probabilities of a credit portfolio whose dependence is governed by a $t$-copula.
\end{enumerate}
\end{remark}

\section{Numerical Experiments}
\label{sec:numexp}

In this section, we perform an extensive numerical study to demonstrate the effectiveness of our proposed methods. We start with a simplistic linear model example, in which case calibration of the optimal densities can be done easily. This allows us to investigate the effect of replacing $g_T^{\text{\tiny{opt}}}$ by $\hat{g}_T^{\text{\tiny{opt}}}$. In Section~\ref{section:credit:gauss}, we apply our SIS and SSIS schemes to a credit portfolio problem under the Gaussian copula model studied by \cite{glassermanli2005}. The same financial problem but this time using a more complicated $t$-copula model is studied in Section~\ref{section:credit:t}.   All computations were carried out in \textsf{R}; see \cite{Rsystem}.

\subsection{Linear Model Example}\label{section:linearmodel}

Let $L = \alpha  T + \varepsilon_T$ where $T\sim \operatorname{N}(0,1)$, $\varepsilon_T \mid T \sim \operatorname{N}(0, s^2)$ and $\alpha^2+s^2 = 1$. $L$ has a single index structure when $\alpha^2\approx 1$ since $R^2 = \operatorname{Var}(m(T))/\operatorname{Var}(L)=\operatorname{Var}(\alpha T)=\alpha^2$.

Assume interest lies in estimating the probability $p_l=\P(L>l)=\bar{\Phi}(l)=\mathbb{E}(\mathbbm{1}_{\{L>l\}})$ for some large $l$; note that we can approximate the true value of $p_l$ efficiently with high precision since $L\sim\operatorname{N}(0,1)$. Furthermore it is easily seen that $p_l(t) = \P(L>l \mid T = t) =  \bar{\Phi}\left( (l-\alpha t) /s\right)$ for $l,t\in\mathbb{R}$. Since the integrand $\Psi$ in this setting is an indicator, we find from Proposition~\ref{prop:IS} that $g_T^{\text{\tiny{opt}}}(t) \propto \sqrt{p_l(t)}f_T(t)$.

Unlike in this simplistic setting, $p_l(t)$ for $t\in\mathbb{R}$ is unknown in practice as discussed in Section~\ref{sec:calibration}; thus, this setting serves as an excellent example to also compare whether approximating $g_T^{\text{\tiny{opt}}}$ by $\hat{g}_T^{\text{\tiny{opt}}}$ has a significant effect on the accuracy of the estimators. Sampling from the true optimal densities is performed using the \textsf{R}\ package \texttt{Runuran} of \cite{leydoldhoermann2020}. We consider the methods $\operatorname{SIS}^{**}$ (constructed using known $p_l(t)$), $\operatorname{SIS}^{*}$ (approximated $p_l(t)$ and NINGL), $\operatorname{SIS}^{\mu}$ and $\operatorname{SIS}^{\mu,\sigma}$

For the two settings of $\alpha^2 \in\{0.7, 0.99\}$ (corresponding to a weaker and stronger single index structure), we estimate $p_l$ for $l\in\{3,4,\dots,7\}$ using the five aforementioned methods. For each value of $l$, the optimal density is calibrated separately. In all examples, we use a sample size of $n=10^6$ and a pilot sample size of $5\times 10^4$. We repeat the experiment 200 times.

Figure~\ref{fig:lm:densdur} displays on the left the optimally calibrated and approximated IS densities. The true optimal density is bell shaped, so it is well approximated by a normal density. It can be confirmed from the plot that in this case, all IS densities seem to cover the important range. The right of Figure~\ref{fig:lm:densdur} displays a boxplot of run-times needed to estimate $p_l$; note that the run-time does not depend on $\alpha$ or $l$. This plot, however, should be interpreted with caution as it highly depends on how the pilot runs are implemented.

\begin{figure}
\centering
\includegraphics[width=0.48\textwidth]{fig_linmod_densities.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_durs.pdf}
\caption{Left: Calibrated densities for $\alpha=0.99$, $l=5$. Right: Run-times for each method including pilot runs.}
\label{fig:lm:densdur}
\end{figure}

Figure~\ref{fig:lm:results:pl} displays mean relative errors; recall that we know $p_l$ here. The relative errors for the different methods are similar, though $\operatorname{SIS}^{\mu,\sigma}$  seems to give smallest errors. A possible explanation might be that the simplicity of that method (e.g., in terms of the support) relative to numerically constructing the optimal density via NINGL might outweigh the benefit of the latter having slightly more theoretical support. Furthermore, note that the IS methods perform much better when $R^2=\alpha^2$ is larger, i.e., when the single index structure is strong, as expected.

\begin{figure}
\centering
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_mre_MC_0.7.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_mre_RQMC_0.7.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_mre_MC_0.99.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_mre_RQMC_0.99.pdf}
\caption{Mean relative errors when using pseudo-random numbers (left) and quasi-random numbers (right) for
$\alpha^2=0.7$ (top) and $\alpha^2=0.99$ (bottom).}
\label{fig:lm:results:pl}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_var_MC_0.7.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_var_RQMC_0.7.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_var_MC_0.99.pdf}
\includegraphics[width=0.48\textwidth]{fig_linmod_pl_var_RQMC_0.99.pdf}
\caption{Mean estimated variance when using pseudo-random numbers (left) and quasi-random numbers (right) for
$\alpha^2=0.7$ (top) and $\alpha^2=0.99$ (bottom).}
\label{fig:lm:results:pl}
\end{figure}

\subsection{Loss Distribution of a Credit Portfolio}\label{section:credit:gauss}
In this section, we study the effectiveness of the proposed methods for a credit portfolio problem studied in \cite{glassermanli2005}, where the goal is to estimate the probability of large portfolio losses under a normal copula model. We compare our proposed methods to the IS technique of Glasserman and Li, to which we refer to as G$\&$L IS.
\subsubsection{Problem Formulation}\label{section:credit:gauss:pars}
Suppose that $Y_k$ denotes the default indicator of the $k$th obligor with exposure $c_k$ and a default probability of $p_k$ for $k=1,\ldots,h$. The incurred loss is then $L = \sum_{k=1}^h c_k Y_k$. Let
$$Y_k = \mathbbm{1}_{\{X_k > \Phi^{-1}(1-p_k)\}},\quad X_k = a_{k1} Z_1 + \cdots + a_{kd} Z_d + b_k \varepsilon_k \sim \operatorname{N}(0,1),\quad k=1,\dots,h,$$
where
$$ (Z_1,\ldots,Z_d) \sim \operatorname{N}_d(\bm{0},I_d), \quad\varepsilon_1,\dots,\varepsilon_h\omu{\text{\tiny{ind.}}}{\sim}{}\operatorname{N}(0,1), \quad \sum_{j=1}^h a^2_{kj} \leq 1,\quad b_k = \sqrt{1- \sum_{j=1}^h a^2_{kj} }.$$
The $a_{kj}$ represent the $k$th obligor's factor loadings for the $d$ risky systematic factors; the choice of $b_k$ ensures $X_k\sim\operatorname{N}(0,1)$. Our goal is to estimate $P(L>l)$ for small $l>0$.

As in \cite{glassermanli2005},  we consider a portfolio with $h=1\ 000$ obligors in a 10-factor model (i.e. $d=10$). The marginal default probabilities and exposures are $p_k = 0.01 \cdot (1+\sin(16 \pi k /h))$ and $c_k = (\left \lceil{{5k/h}}\right \rceil)^2$ for $k=1,\ldots, h$, respectively. The marginal default probabilities vary between $0 \%$ and $2\%$ and the possible exposures are 1, 4, 9, 16 and 25, with 200 obligors at each level. The factor loadings $a_{kj}$'s are independently generated from a $\operatorname{U}(0,1/\sqrt{d})$.
Letting $\bm{Z}=(Z_1,\ldots,Z_d)^{\top}$ and $\bm{\varepsilon}=(\varepsilon_1,\ldots,\varepsilon_h)^{\top}$, we write $L=L(\bm{Z},\bm{\varepsilon})$,
i.e.,  the vector $\bm{X}$ to which we have referred throughout this paper is given by $\bm{X}=(\bm{Z},\bm{\varepsilon})$ for this example.
We investigate whether or not $L$ has a single-index structure. Let $T= \bm{\theta}^{\top} \bm{Z}$ where $\bm{\theta} \in \mathbb{R}^d$ such that $\bm{\theta}^{\top} \bm{\theta}=1$, so $T \sim \operatorname{N}(0,1)$. We estimate $\bm{\theta}$ that maximize the fit by using the average derivative method of \cite{stoker1986}. The estimated $\bm{\theta}$ has almost equal entries close to $\sqrt{1/d}$. This makes intuitive sense, as each component of $\bm{Z}$ is likely to be equally important because the factor loadings are generated randomly.
The left side of Figure~\ref{fig:scatter:optdens:gcop} shows the scatter plot of $(T,L)$.
The figure reveals the single-index model fits $L$ well even in the extreme tail, implying SIS based on this choice of $T$ will give substantial variance reduction.
The right side of Figure~\ref{fig:scatter:optdens:gcop} displays the original density of $T$, the optimally calibrated $\operatorname{SIS}^*$ density as well as the estimated function $p_l(t)$. Note that the optimally calibrated density's mode substantially differs from the original one.

\begin{figure}[h]
	\centering
	\includegraphics[width = 0.48\textwidth]{fig_gcop_TvsL_normal.pdf}
	\includegraphics[width = 0.48\textwidth]{fig_gcop_optdens.pdf}
	\caption{Plot of Transformed variable ($T$) vs Portfolio Loss ($L$) based on 10\ 000 observations (left) and OCIS density calibrated to $l=3000$ (right).}
	\label{fig:scatter:optdens:gcop}
\end{figure}

\subsubsection{Proposed estimators}
The method of \cite{glassermanli2005} consists of a two-step procedure. In a calibration stage, an optimal mean vector $\bm{\mu}\in\mathbb{R}^d$ is found by solving an optimization problem minimizing the variance of the resulting IS estimator. Next, one samples $\bm{Z}\sim\operatorname{N}_d(\bm{\mu}, I_d)$ and computes the conditional default probabilities $p_k(\bm{Z})=\P(Y_k=1\mid \bm{Z})=\Phi( (\bm{a}_k^{\top}\bm{Z} - x_k)/b_k)$, which enter another optimization problem used to find a number $\theta\in\mathbb{R}$ so that $q_k(\theta, \bm{Z})$ are variance minimizing default probabilities. Given $\bm{Z}$, we know that $Y_1,\dots,Y_h$ are independent and can therefore easily sample the loss via $L=\sum_{k=1}^h c_k \mathbbm{1}_{\{U_k \leq q_k(\theta(\bm{Z})\}}$ where $(U_1,\dots,U_h)\sim \operatorname{U}(0,1)^h$. Finally, the estimator $\mathbbm{1}_{\{L>l\}}\cdot w(\bm{Z}, L)$ where $w$ denotes the IS weight function is an unbiased estimator.

Our method $\operatorname{SIS}^{\mu,\sigma}$ proceeds as described in \ref{alg:SIS:full}; $\operatorname{SIS}^{\mu}$ omits sets the scale to unity while the $\operatorname{SSIS}$ methods also stratify. Once $\bm{Z}\mid T$ is sampled, we sample $Y_k$ from $p_k(Z)$ independently. We also include $\operatorname{SIS}^*$ and $\operatorname{SSIS}^*$, where the function $p_l(t)$ is estimated as before and the quantile function of the optimal distribution is estimated via the NINiGL algorithm, in our experiments; see also Figure~\ref{fig:scatter:optdens:gcop}.

\subsubsection{Comparison}
We compare SIS and SSIS to G\&L IS by computing estimates, standard errors and computation times for $l \in \{100, 1000, 2000, 3000, 4000\}$. All methods require a calibration stage. For this comparison, we optimize the proposal distributions at each loss level of $l$ separately and estimate the corresponding loss probability.
Table~\ref{table:res:gausscredit} shows the estimated probabilities along with half-widths of estimated confidence intervals (CI) in brackets. The last column shows the average computational time of each method over all loss levels $l$. All examples used $n=5000$ samples and $1000$ samples for the calibration.

We see that all our methods lead standard errors smaller than G\&L IS, while the estimated CIs for both methods are typically overlapping, supporting the correctness of both approaches. Given the small run-time, unbiasedness and small estimated errors, we can conclude that $\operatorname{SSIS}^{\mu,\sigma}$ is the best estimator for this problem. This supports our claim that the optimal density of $T$ can be quickly and accurately approximated by a location scale transform of $f_T$. Note that $\operatorname{SIS}^*$ and $\operatorname{SSIS}^*$ are particularly slow, as it involves numerically approximation the quantile function corresponding to the optimal $g_T$.

\begin{table}[ht]
	\centering
	\begin{tabular}{c|cccccc}
	  	\toprule
	l & 100 & 1000 & 2000   &3000 &4000   & Avg run-time (sec)\\
	\midrule
G\&L IS     & 0.28  &0.0079 &0.00077&9.2e-05&1.1e-05&2.45\\
	& (0.0078) & (0.00036) & (4.1e-05) & (6.3e-06) & (8.8e-07) & \\
$\operatorname{SIS}^*$      &0.28&  0.0081&0.00076&9.2e-05&1.1e-05&6.62\\
		& (0.0068)& (0.00021)& (2.1e-05) & (2.4e-06) & (3.5e-07)& \\
$\operatorname{SSIS}^*$       &0.28&  0.0082&0.00077&9.5e-05&1.1e-05&12.56\\
			& (0.0046) & (0.00014) & (1.4e-05) & (1.7e-06) & (2.5e-07) & \\
$\operatorname{SIS}^{\mu}$      &0.28&  0.0077&0.00074&8.6e-05&1e-05   &1.41\\
				& (0.0086) & (0.00039) & (4.2e-05) &(5.5e-06) & (6.8e-07) & \\
$\operatorname{SSIS}^{\mu}$   &0.28&  0.008& 0.00075&9.1e-05&1.1e-05&1.45\\
					& (0.0062) & (0.00028) & (2.9e-05) &(4e-06)&(5.1e-07) & \\
$\operatorname{SIS}^{\mu,\sigma}$ &0.28&  0.0082&0.00077&9.4e-05&1.1e-05&2.45\\
						&(0.0077)&(0.00034) & (3.3e-05) & (5.2e-06) &(4.6e-07) & \\
$\operatorname{SSIS}^{\mu,\sigma}$ &0.28&  0.0081&  0.00075&8.9e-05&1.1e-05&   2.2\\
							&(0.0059) &(2e-04) & (1.9e-05)& (2.3e-06) & (3e-07) & \\
	\bottomrule
	\end{tabular}
		\caption{Estimates and CI halfwidths when estimating $p_l$ in the Gaussian Credit Portfolio problem with $h=1000$ obligors and $d=10$ factors for various $l$
	and methods. The last column displays average run-times. }
	\label{table:res:gausscredit}
	\end{table}

	          \begin{table}[ht]
	\centering
	\begin{tabular}{c|cccccc}
	  	\toprule
	l & 100 & 1000 & 2000   &3000 &4000   \\
	\midrule
G\&L IS     & 1.5 & 1.5 & 1.5 & 1.5 & 1.6 \\
$\operatorname{SIS}^*$  & 1.3 & 1.3 & 1.2 & 1.7 & 1.5 \\
$\operatorname{SIS}^{\mu,\sigma}$ & 1.6 & 1.5 & 1.9 & 1.7 & 1.6 \\
$\operatorname{SSIS}^{\mu,\sigma}$ & 1 & 1.1 & 1 & 1.1 & 0.9 \\
	\bottomrule
	\end{tabular}
		\caption{Relative error reduction factors RE(MC)/RE(RQMC) for the Gaussian credit portfolio with
		$h=1000$ obligors and $d=10$ factors for various $l$
	and methods. }
	\label{table:vrf:gausscredit}
	\end{table}

\subsection{Tail probabilities of a $t$-Copula Credit Portfolio}\label{section:credit:t}
In this section, we apply SIS to a credit portfolio problem under a $t$-copula model, which is the model studied in Section~\ref{section:credit:gauss} with a multiplicative shock variable included. This $t$-copula model is a special case of the models with extremal dependence studied in \cite{bassamboojunejazeevi2008}. Unlike the Gaussian copula, the $t$-copula is able to model tail dependence of latent variables, so simultaneous defaults of many obligors are more likely under the $t$-copula model than under its Gaussian copula counterpart.

\subsubsection{Problem Formulation}
In the $t$-copula model, the latent variables $\bm{X}=(X_1,\ldots,X_d)$ are multivariate-$t$ distributed, that is,
\begin{align*}
X_k = \sqrt{W} (a_{k1} Z_1 + \cdots + a_{kd} Z_d + b_k \varepsilon_k),\quad k=1,\dots,h,
\end{align*}
where $W \sim\operatorname{IG}(\nu/2,\nu/2)$ is independent of $Z_1,\dots,Z_d, \varepsilon_k\omu{\text{\tiny{ind.}}}{\sim}{}\operatorname{N}(0,1)$. Accordingly, we define $Y_k = \mathbbm{1}_{\{X_k > t^{-1}_{\nu}(1-p_k)\}}$. We assume the same parameters as in Section~\eqref{section:credit:gauss:pars}, except that now we have $h=50$ obligors, and the two settings for the degrees-of freedom $\nu\in\{5, 12\}$. Let $\bm{Z}=(Z_1,\ldots,Z_d)^{\top}$ and $\bm{\varepsilon}=(\varepsilon_1,\ldots,\varepsilon_h)$. We consider two transformations.
For the first transformation,  let $Z_W= \Phi^{-1}(F_W(W))$ and
$$T_1(W, \bm{Z}, \bm{\epsilon})=\beta_W Z_W + \bm{\beta}_{L}^{\top} \bm{Z},$$
where $\beta_W\in\mathbb{R}$ and $\bm{\beta}_{L}\in\mathbb{R}^d$ are such that $\beta^1_W+\bm{\beta}_{L}^{\top}\bm{\beta}_{L}=1$. Then, $T_1 \sim \operatorname{N}(0,1)$ since $Z_W\sim\operatorname{N}(0,1)$ is independent of $\bm{Z}$.

Our second transformation relies on the random variable $S_l(\bm{Z},\bm{\varepsilon})=\P(L>l \mid \bm{Z},\bm{\varepsilon})$ and note that $\P(L>l)=\mathbb{E}(S_l(\bm{Z},\bm{\varepsilon}))$. Based on this and the fact that, given a sample $\bm{Z}, \bm{eps}$, the function $S_l$ can be computed analytically, \cite{chankroese2010} propose to use CMC, i.e., estimating $\P(L>l)$ by the sample mean of $S_l(\bm{Z}_i,\bm{\varepsilon}_i)$ for independent $\bm{Z}_i,\bm{\varepsilon}_i$ for $i=1,\dots,n$. We propose to use this CMC idea combined with SIS by using the transformation
$$T_2=\bm{\beta}_S^{\top}\bm{Z}$$
with $\bm{\beta}_S$ such that $\bm{\beta}_S^{\top}\bm{\beta}_S=1$, which implies $T_2\sim\operatorname{N}(0,1)$.

The second method based on CMC, is very effective as the variable $W$ which accounts for a large portion of the variance of $L$, is integrated out. Furthermore, \cite{chankroese2010} additionally employ IS on $(\bm{Z},\bm{\varepsilon})$ to make the event $\{L>l\}$ more frequent using the cross-entropy method; see \cite{deboerkroesemannorrubinstein2005, rubinstein1997,rubinsteinkroese2013}. We refer to Chan and Kroese's method as C\&K CMC+IS. The numerical study in~\cite{chankroese2010} demonstrates that C\&K CMC+IS achieves substantial variance reduction. We will show in our numerical examples below that combining their CMC idea with our proposed single index IS method gives even greater variance reduction.

\subsubsection{Fit of Single-Index models with and without conditional Monte Carlo}
We first investigate whether or not $L$ and $S_l$ have single-index structures.
As before, the coefficients $\bm{\beta}$ that maximize the fit of the single-index model are estimated using the average derivative method of Stoker \cite{stoker1986}.

\begin{figure}[htbp]
	\centering
	\includegraphics[width = 0.48\textwidth]{fig_condsample_t_df5trafo1.pdf}
	\includegraphics[width = 0.48\textwidth]{fig_condsample_t_df5trafo2.pdf}
	\includegraphics[width = 0.48\textwidth]{fig_condsample_t_df12trafo1.pdf}
	\includegraphics[width = 0.48\textwidth]{fig_condsample_t_df12trafo2.pdf}
		\caption{Scatter plots of $L$ vs $T_1$ (left) and $S_l$ vs $T_2$ (right) where $l=500$ and $\nu = 5$ (top) and $\nu = 12$ (bottom). }
	\label{fig:T_vs_L_tcredit}
\end{figure}

Figure~\ref{fig:T_vs_L_tcredit} shows scatter plots of $(T_1,L)$ and $(T_2, S_l)$ for $\nu=12$ and $\nu=5$.
The figures show that there is a strong association between $T_1$ and $L$ but the dependence is stronger when $\nu=12$ than when $\nu=4$. When $\nu=4$, there is a significant variation of $L$ that cannot be captured by the single-index model based on $T_1$ in the right-tail. This observation holds more generally; the smaller $\nu$ (i.e., the stronger the dependence between the $\bm{X}_i$), the worse the fit of the single-index model becomes in the right-tail.
When investigating the fit of $(T_2, S_l)$, recall that the main advantage of CMC is that $W$ is integrated out; the resulting estimators should be less sensitive to the degrees-of-freedom $\nu$, which is the case in the plot. We can see that the fit of $T_2$ is excellent even in the outer right-tail for all settings of $\nu$ and $l$.

\subsubsection{Estimates and estimated variances}

\begin{figure}
\includegraphics[width = 0.48\textwidth]{fig_tcredit_dens_df2trafo1.pdf}
\includegraphics[width = 0.48\textwidth]{fig_tcredit_dens_df2trafo2.pdf}
\caption{Optimally calibrated densities for $l=100$ and the transformations $T_j$ for $j=1,2$. }
\end{figure}

\begin{figure}
\centering
\includegraphics[width = 0.45\textwidth]{fig_tcop_ests_trafo1df_1.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_vars_trafo1df_1.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_ests_trafo2df_1.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_vars_trafo2df_1.pdf}
\caption{Estimates (left) and estimated variances (right) as a function of $n$ for $\nu=5$. }
\label{fig:tcop:estvars:1}
\end{figure}

\begin{figure}
\centering
\includegraphics[width = 0.45\textwidth]{fig_tcop_ests_trafo1df_2.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_vars_trafo1df_2.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_ests_trafo2df_2.pdf}
\includegraphics[width = 0.45\textwidth]{fig_tcop_vars_trafo2df_2.pdf}
\caption{Estimates (left) and estimated variances (right) as a function of $n$ for $\nu=12$. }
\label{fig:tcop:estvars:2}
\end{figure}

We compare the original C\&K CMC+IS from \cite{chankroese2010} with SIS with and without CMC. We additionally investigate whether employing RQMC yields a variance reduction. To this end, we estimate $p_l$ for $l=100$ for various $n$ and methods; see Figures~\ref{fig:tcop:estvars:1} and \ref{fig:tcop:estvars:2}. Variances are estimated as the sample variance of $B=20$ repetitions; this ensures that the same variance estimator (namely, the sample variance) is used for both methods, rather than using the estimator from Proposition~\ref{prop:SISvar:est} for MC and the sample variance for RQMC.

Note that for fixed $\nu$, the data for C\&K CMC+IS are identical independent of which transformation is used, so these lines can be used as reference. As expected, variances with the CMC idea are smaller than without the CMC idea. Note further that all our (S)SIS methods combined with $T_1$ (which does not integrate out $W$) give smaller variances than C\&K CMC+IS, which does integrate out $W$.

\section{Concluding Remarks}
\label{sec:conclusion}
In this paper, we developed importance sampling and stratification techniques that are designed to work well for problems with a single-index structure, i.e., where the response variable depends on input variables mostly through some one-dimensional transformation. The main theme of our approach is to exploit the low-dimensional structure of a given problem in rare-event simulation by introducing a conditional sampling step on this important transformed random variable and using optimal IS.

We derived expressions for optimal densities of said one-dimensional transformation which achieve minimum variance and discussed boundary cases with zero variance. Furthermore, we demonstrated that our framework includes and generalizes existing mean-shifting techniques.  Our theoretical framework and numerical examples suggest substantial variance reduction for problems having strong single-index structures. As the optimal density rarely belongs to a known parametric family, we also give explicit steps to calibrate the proposal distribution.

Our numerical experiments revealed that the proposed methods outperform existing methods that were specifically tailored to the Gaussian and $t$-copula credit portfolio problem. The success of our method in this framework highlights the flexibility and wide applicability of our approach.

By combining our single-index framework with RQMC methods, we achieve even more precise estimation results, thanks to the dimension reduction feature of our conditional sampling step.

Note that there exist many other low-dimensional structures studied in the literature and they may provide a better fit than single-index models do. For instance, the structure assumed by the sufficient dimension reduction can be seen as a multi-index extension of the linear single-index model; see \cite{cook1998, cookforzani2009, adrangicook2009}. We would like to develop importance sampling techniques for problems based on other low-dimensional structures in future research.

redpajama_set_name: RedPajamaArXiv


Tune your top two strings up a semitone and simplify the guitar. Do you get lost on certain parts of the neck? Do you find yourself getting stuck into the same old patterns and licks? Sometimes it is really difficult to remember which notes are on which string on which frets. If you tune in perfect fourths then everything will make perfect sense. There are no different fingerings for chords on different string groups. Join the new generation of guitar players tuning all their strings to the fifth fret and accelerating the learning process.


ZKAccess, a division of ZKTeco and leading provider of biometric and RFID security solutions, is committed to educating and supporting its dealer network so they can better compete in the security market. As part of this commitment, ZKAccess has recently created three new "dealer-focused" positions.
Their new Training & Course Development Manager is developing and conducting Access Control training courses in ZKAccess distributors' learning centers all across the country. The goal is to help ZKAccess dealers become self-sufficient regarding the installation of ZKAccess products, as well as enhance their overall access control knowledge to help grow their business and careers. Delmar Dossantos, Training & Course Development Manager, can be reached at delmar@zkaccess.com.
ZKAccess' Customer Satisfaction Representative ensures that all ZKAccess dealers' technical support inquiries are addressed and resolved quickly. In addition to dispatching tech support inquiries to the Help Desk, the rep also follows up with dealers afterwards to ensure the their technical issues were fully resolved. Customer Satisfaction Representative, can be reached at joanna@zkaccess.com.
ZKAccess' new Sales Engineer, Joe Fryd, develops meaningful relationships with dealers by understanding their business goals and ensuring they're fully knowledgeable and capable of effectively leveraging the entire ZKAccess comprehensive product line which will ensure their success.
"Joe literally 'owns' our dealer channel," says Larry Reed, CEO, ZKAccess. "With a well-educated, well-supported network of ZKAccess dealers, our distributors have their hands full responding to all the procurement needs of our growing dealer channel!" Joe can be reached at joe@zkaccess.com.


I have a model 97fc which i never really used but want to now. Is there a firmware update available for this. Here is the info from the tablet itself.
Since X10WTI went out of business there will be no official firmware updates.
You may find a third party firmware that will work.
Authinx took over X10 but currently doesn't have any tablets and if they do get into that market it is doubtful firmware will be compatible.
If X10WTI had a firmware update on its servers X10(Authinx) hasn't discovered it yet and may never as some of the servers were in such a bad state that some info was lost.


text:
var definitions = {
  ViewBuilder: require('./../definitions/viewBuilder'),
  EventExtender: require('./../definitions/eventExtender'),
  PreEventExtender: require('./../definitions/preEventExtender'),
  Collection: require('./../definitions/collection')
};

module.exports = function (loader) {
  return function(denormalizerPath, callback) {
    var options = {
      denormalizerPath: denormalizerPath,
      definitions: definitions,
    };

    var tree;
    try {
      var loadedTree = loader(options);
      var tree = {
        generalPreEventExtenders: loadedTree.preEventExtenders || [],
        collections: loadedTree.collections,
        generalEventExtenders: loadedTree.eventExtenders || []
      };
    } catch(e) {
      return callback(e);
    }

    return callback(null, tree);
  }
}


Today, Hyperstone introduces their new S8 – SD/MMC Flash Memory Controller. S8 is targeting applications such as SDHC, SDXC, SD (SecureDigital), smartSD, smart microSD, high speed and UHS-I memory cards as well as e•MMC MCP modules. Together with Hyperstone's proprietary hyReliability™ firmware, it provides enhanced endurance and data retention management, as well as rigorous fail-safe features, all of which are mandatory for industrial applications.
S8 will initially be available as Probed Die and in an LGA-52 package. Samples are available immediately.
Hyperstone's products include microcontrollers for Serial-ATA and Parallel-ATA Solid State Disks (SSD), Disk-on-Module (DoM), Disk-on-Board (DoB), embedded Flash solutions such as eMMC, and Flash cards such as CF, SD & microSD. Flash controller firmware is supplied complementary to the controllers and customized for each flash and application. Hyperstone is one of the pioneers in the flash memory controller business and owns several patents for flash handling, including wear leveling algorithms and microprocessor design.
More information is available at www.hyperstone.com.


A walk-in bathtub in Pittsburgh is a great option for seniors who may have developed problems with mobility. These bathtubs are a great solution for those who find it difficult to get into the traditional bathtub or shower.
Manufacturers are coming up with new designs and models for walk-in bath tubs. It can be quite difficult choosing the right walk-in bathtub in Pittsburgh for your needs.
The following tips ought to make the process easier.
These bathtubs are designed with a hinged door on the side of the tub. They therefore provide a lower step over threshold (between 3 to 7 inches) as compared to their traditional counterparts (about 15 inches).
Although the bathtub has a door on the side, it is completely watertight. However, its ability to remain leak-proof for a long time will depend on its quality. This is discussed further below.
The bathtubs also come with built-in seats, anti-slip floors, a handheld showerhead and grab bars. They are designed to accommodate people with mobility problems. There are some models that have various other features to cater to special needs. For example, there are models with spa-like features that can help in therapy of arthritis.
These tubs come in different shapes and sizes. Most models have walls of about 3 feet or higher. They range from 26 to 32 feet in width. Many of them will fit into the same space as a standard tub would fit without the need for reconfiguring the space. Find out if you can get an extension kit from the supplier if the tub does not fit into the space you have available.
It is important to ensure that you are getting a high quality walk-in bathtub in Pittsburgh. If you want the best quality, ensure that you go for a locally made tub (i.e. one that was made in the USA). It is also important to check the warranty on the 'leak-proof' seal of the tub. The best quality tubs will have a lifetime warranty on their door seals and their operating systems.
The door opening mechanisms may differ from one tub to another. Most have an inward opening door. If the person using the tub is a large person or has a wheelchair, go for the outward opening door. The outward opening door however requires more space.
Check out Patetekitchens.com for a wide variety of walk-in bathtubs in Pittsburgh.


text:
Elgon's Fashionable Entrance into the U.S. Market
Elgon USA makes massive impact with its inaugural title sponsorship of Los Angeles Fashion Week.
Los Angeles, USA – From October 17th – 20th 2019, Elgon, the legacy hair care brand from Italy, made its debut at the largest fashion week production on the west coast Los Angeles Fashion Week Powered by Art Hearts Fashion. The event featured over 30 international designers and was held at the Majestic Downtown. From start to finish Elgon hair care created hundreds of runway looks over the course of the 4-day span of shows.
Los Angeles Fashion Week powered by Art Hearts Fashion was awarded the official recognition by the city of Los Angeles for its work in the arts and fashion community, and attracted droves of celebrities, stylists and the fashion elite to its creative forum for the celebration of everything beauty. Elgon was at the helm of this celebration with its exquisite Italian formulations and quality, the looks on the runway were a true representation of the decades of expertise from the hair care company. From slick back ponies, to over the top hair sculptures, Elgon hair products were up for the challenge and seamlessly created the hundreds of hair looks with their vast array of styling products.
To learn more about Elgon visit www.ElgonCosmetic.com and to learn more about Art Hearts Fashion visit www.ArtHeartsFashion.com and by city at www.LosAngelesFashionWeek.com, www.NYFW.net and www.MiamiSwimWeek.com.
About Elgon
100% Made in Italy. Elgon was established in 1970 in Milan, the international capital of fashion and style, drawing on the talent and experience of the founder in the field of professional cosmetics. For 45 years Elgon has worked to provide the right tools to hairdressers that believe in the power of beauty and in the creative force of their job.
Celine, Elgon Italy LLC
5 Cheryl Lane
Boonton Township, NJ 07005
http://www.elgoncosmetic.com
About Art Hearts Fashion
Established since 2011, ART HEARTS FASHION is a forward-thinking and innovative fashion platform that is breaking new ground with cutting-edge runway presentations in New York, Los Angeles, Miami, and Asia.
The visionary productions have garnered national and international acclaim from fashion authorities including, but not limited to, Harper's Bazaar, Vogue, WWD, Cosmopolitan, Elle, Popsugar, and Refinery29. It has attracted mass media coverage by major outlets such as Snapchat, Today Show (NBC), CBS Television, Fox Television, Amazon Prime, The Huffington Post, Forbes Magazine, and numerous digital and cable networks throughout the world. As of 2018, ART HEARTS FASHION produces the #1 Los Angeles Fashion Week, #1 Miami Swim Week, and in the top fashion platforms at New York Fashion Week. (www.ArtHeartsFashion.com)
Company Name: Elgon Italy LLC
Contact Person: Celine
Website: http://www.elgoncosmetic.com

redpajama_set_name: RedPajamaCommonCrawl


Well its hot in New Zealand, we are all Sizzling!!!!
This week we are talking about Hive Alive, New Wasp bait and 6 Things You Didn't Know About Queen Bees and why does honey crystallise? This is Episode Eighty five of our beekeeping podcast.
Infrared Camera Should your tool kit have one?
And who won the Random review prize this month and much much more.


Harry David was established in 1910 when Samuel Rosenberg (Seattle hotelier) bought 240 acres of pear orchards in Oregon. The company had been taken over by his sons - Harry and David after his death in 1914. It is known to customers to begin business relating to mail order direct marketing of fruits. It is famous for Fruit-of-the-Month Club. It is also specialized for holiday gift towers and high-end gift baskets. The company added Jackson & Perkins (mail order rose marketer) in 1966 which again had been sold for $49 million to an outsider group of investors in 2007. In 2004, the company was purchased by Wasserstein & Company, a private investment firm.
There are currently 0 consumer reviews about Harry And David available. Share your review.
Please take a note that you are about to post a public review about Harry And David corporate office on CorporateOffice.com. This review will be public, so please do not post any of your personal information on this website. If you would like to contact the corporate offices of Harry And David, please use their contact information such as their phone number, website, and address listed above to contact them. However, sometimes staff from Harry And David headquarters do read the reviews on this website.


Printed to order with your personalized message, 1 line up to 36 letters and spaces. 144 premium #2 pencils per order, non-toxic and supplied unsharpened. You will be prompted to enter your custom imprint at checkout.