导航

    精算后花园

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    • 话题
    • 热门
    • 用户
    • 群组
    1. 主页
    2. Nothanks
    N
    • 资料
    • 关注
    • 粉丝
    • 主题
    • 帖子
    • 最佳
    • 群组

    Nothanks

    @Nothanks

    5
    声望
    13
    帖子
    4
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 2020年5月27日 14:28 最后登录 2021年9月11日 06:22

    Nothanks 关注

    Nothanks 发布的最佳帖子

    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第二步:连接数据库

      这里用了DBI和odbc包。验证方式是"Windows Authentication",也就是用系统的用户信息来登录数据库。

      library(DBI)
      library(odbc)
      
      con <- dbConnect(odbc::odbc(), 
                       Driver = "SQL Server", 
                       Server = "my server name", #这里替换成自己的Server名字 
                       Database = "DataBase", #这里替换成自己的DataBase名字 
                       Trusted_Connection = "True")
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:39
    • RE: 寿险精算中的 mx 代表什么?

      转自 https://www.acted.co.uk/forums/index.php?threads/central-rates-of-mortality.4540/
      qx is the initial rate of mortality. This measures the number of deaths divided by the number of lives alive at age x. The problem with this is that it assumes that there are "lx" person years lived between age x->x+1 (Obviously lives will die durring the year of age, and not be exposed to risk for the whole year). mx is the same thing, but it is dx divided by the expected number of person years lived between ages x->x+1. This is Integral from 0-1 lx+tdt. The meaning of the two is very different. qx is the probability a life now aged x dies within the next year given alive at time x. mx is the probability a life aged anywhere between x,x+1 dies before attaining age x+1. I dont think it's used very much in actuarial calculations but it is handy in dermograpic/population studies because of the nice property that mx∗ExC for any age equals the number of deaths, this is not true for qx (Try this for yourself).

      发布在 CM1利息理论和寿险精算
      N
      Nothanks
      2020年5月27日 14:34
    • RE: 【文献求助】understanding actuarial management

      @yuk FYI
      Understanding Actuarial Management Part I.pdf
      Understanding Actuarial Management Part II.pdf
      Understanding Actuarial Management Part III.pdf
      Understanding Actuarial Management Part IV.pdf
      Understanding Actuarial Management Part V.pdf
      Understanding Actuarial Management Part VI.pdf

      发布在 CP1-3
      N
      Nothanks
      2020年6月14日 01:10
    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第三步:写入数据库,这里用了tryCatch来让程序不会在产生Error的情况下停止

      
      for(i in 1:length(ldf)){
        tryCatch(
          data <-dbWriteTable(con, names(res)[i], data.frame(ldf[i]))
          ,
          error = function(e){
            message("An error occurred:\n", e)
          },
          warning = function(w){
            message("A warning occured:\n", w)
          },
          finally = {
            message("Finally done!")
          })
        }
      
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:52
    • RE: 不太常见的换算函数(Commutation function)

      这个现在也就只有理论意义了吧。。。现在工作还用得着换算函数吗??计算能力都上来了,Excel算一下不就行了?

      发布在 CM1利息理论和寿险精算
      N
      Nothanks
      2020年6月3日 13:59

    Nothanks 发布的最新帖子

    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第三步:写入数据库,这里用了tryCatch来让程序不会在产生Error的情况下停止

      
      for(i in 1:length(ldf)){
        tryCatch(
          data <-dbWriteTable(con, names(res)[i], data.frame(ldf[i]))
          ,
          error = function(e){
            message("An error occurred:\n", e)
          },
          warning = function(w){
            message("A warning occured:\n", w)
          },
          finally = {
            message("Finally done!")
          })
        }
      
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:52
    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第二步:连接数据库

      这里用了DBI和odbc包。验证方式是"Windows Authentication",也就是用系统的用户信息来登录数据库。

      library(DBI)
      library(odbc)
      
      con <- dbConnect(odbc::odbc(), 
                       Driver = "SQL Server", 
                       Server = "my server name", #这里替换成自己的Server名字 
                       Database = "DataBase", #这里替换成自己的DataBase名字 
                       Trusted_Connection = "True")
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:39
    • RE: 【快乐自动化】如何用R连接数据库并批量导入数据

      第一步:批量读入数据,存储为Data.Frame格式

      借鉴了下面帖子里面的做法
      https://stackoverflow.com/questions/9564489/read-all-files-in-a-folder-and-apply-a-function-to-each-data-frame

      path = "my path" #这里替换成自己的路径
      LenPath = nchar(path)
      filenames <- list.files(path , pattern="*.csv", full.names=TRUE)
      ldf <- lapply(filenames, read.csv)
      res <- lapply(ldf, summary)
      names(res) <- substr(filenames,LenPath+2, LenPath + 30) #这里要根据自己的文件名改变长度
      

      如果是txt文件,可以用下面的代码

      path = "my path" #这里替换成自己的路径
      LenPath = nchar(path)
      filenames <- list.files(path , pattern="*.txt", full.names=TRUE)
      ldf <- lapply(filenames, read.delim)
      res <- lapply(ldf, summary)
      names(res) <- substr(filenames,LenPath+2, LenPath + 30) #这里要根据自己的文件名改变长度
      
      发布在 R
      N
      Nothanks
      2021年8月29日 13:37
    • 【快乐自动化】如何用R连接数据库并批量导入数据

      想要批量导入数据到数据库,试验了SQL Server的Bulk Insert,觉得没有那么好用,于是就转向了R。

      分成三步。
      第一步:批量读入数据,存储为Data.Frame格式
      第二步:连接数据库
      第三步:写入数据库

      发布在 R
      N
      Nothanks
      2021年8月29日 13:32
    • RE: Mac版本Excel VBA的bug

      现在的一个Solution是在Mac电脑上不要定义变量类型为Double,而使用Variant。

      发布在 Excel & VBA
      N
      Nothanks
      2021年8月29日 10:53
    • Mac版本Excel VBA的bug

      在给Double变量赋值为0.5的时候,Mac VBA跑出了Bug: 溢出 (Overflow)
      代码大概是

      Option Explicit
      Sub Pro()
      Dim Mid as double
      Mid = 0.5
      End Sub
      

      同样的代码放到Windows去跑就没有问题。
      稍微在网上查了一下,这似乎是一个2019年版本开始就有的Bug。定义变量为Double的时候,给变量赋值会出错。不知道大家有没有遇到过类似的问题。
      https://techcommunity.microsoft.com/t5/excel/runtime-error-6-overflow-with-dim-double-macos-catalina-excel/m-p/786433

      发布在 Excel & VBA
      N
      Nothanks
      2021年8月29日 10:48
    • RE: 英国精算申请~Aon, Willis Towers Watson Video Interview 分享

      @Doris-886 记得是可以的,不过在线打字也很快~

      发布在 面试经验
      N
      Nothanks
      2021年8月29日 10:43
    • 死亡率假设随着年龄趋同

      想问下大家,有没有人记得有一个理论是,生存超过一定岁数后,不同subgroup的死亡率会趋同(converge)? 这是为什么来着?
      不同subgroup就是,比方说Smoker和Non-Smoker。

      发布在 实务交流 (Work experience)
      N
      Nothanks
      2021年5月1日 09:38
    • IFoA各科目备考的导引篇

      2020年9月的考试可以看:
      2020年9月英国精算师考试的几个重要通知(7月14日更新)
      以及各科目备考的导引篇:

      • 漫谈英国精算师考试

      • IFoA英国精算师考试新大纲介绍和各科目考试顺序建议

      • 英国精算师考试备考资料介绍和购买流程(2020更新版)

      • 如何蒙混过关|英国精算师考试的备考方法

      • 【CM1导引篇】Actuarial Mathematics

      • 【CM2导引篇】Loss Reserving and Financial Engineering

      • 【CS1导引篇】Actuarial Statistics

      • 【CT3导引篇】Probability and Statistics

      • 【CS2导引篇】Risk Modelling and Survival Analysis

      • 【CT4导引篇】Models

      • 【CB1导引篇】Business Finance

      • 【CB2导引篇】Business Economics

      • 【SP8导引篇】General Insurance Pricing

      • 精算师考试计算器使用指南 - 金融计算器 BA II Plus

      • 邂逅澳洲精算师协会 来一场“曲线救国”的恋爱(一)

      • 精算师考试要花多少钱?IFoA,SOA,CAS,CAA报名费大盘点【零基础入坑精算系列01】

      • 豁免SP0的捷径(IFoA正精算师阶段)

      发布在 英国精算师(IFoA)和澳洲精算师(IAAust)
      N
      Nothanks
      2020年7月17日 08:51
    • RE: 【文献求助】understanding actuarial management

      @yuk FYI
      Understanding Actuarial Management Part I.pdf
      Understanding Actuarial Management Part II.pdf
      Understanding Actuarial Management Part III.pdf
      Understanding Actuarial Management Part IV.pdf
      Understanding Actuarial Management Part V.pdf
      Understanding Actuarial Management Part VI.pdf

      发布在 CP1-3
      N
      Nothanks
      2020年6月14日 01:10