We develop quantile functions from regression models in order to derive risk margin and to evaluate capital in non-life insurance applications. By utilizing the entire range of conditional quantile functions, especially higher quantile levels, we detail how quantile regression is capable of providing an accurate estimation of risk margin and an overview of implied capital based on the historical volatility of a general insurers loss portfolio. Two modeling frameworks are considered based around parametric and non-parametric regression models which we develop specifically in this insurance setting. In the parametric framework, quantile functions are derived using several distributions including the flexible generalized beta (GB2) distribution family, asymmetric Laplace (AL) distribution and power-Pareto (PP) distribution. In these parametric model based quantile regressions, we detail two basic formulations. The first involves embedding the quantile regression loss function from the nonparameteric setting into the argument of the kernel of a parametric data likelihood model, this is well known to naturally lead to the AL parametric model case. The second formulation we utilize in the parametric setting adopts an alternative quantile regression formulation in which we assume a structural expression for the regression trend and volatility functions which act to modify a base quantile function in order to produce the conditional data quantile function. This second approach allows a range of flexible parametric models to be considered with different tail behaviors. We demonstrate how to perform estimation of the resulting parametric models under a Bayesian regression framework. To achieve this, we design Markov chain Monte Carlo (MCMC) sampling strategies for the resulting Bayesian posterior quantile regression models. In the non-parametric framework, we construct quantile functions by minimizing an asymmetrically weighted loss function and estimate the parameters under the AL proxy distribution to resemble the minimization process. This quantile regression model is contrasted to the parametric AL mean regression model and both are expressed as a scale mixture of uniform distributions to facilitate efficient implementation. The models are extended to adopt dynamic mean, variance and skewness and applied to analyze two real loss reserve data sets to perform inference and discuss interesting features of quantile regression for risk margin calculations.