O******e 发帖数: 734 | 1 Dynamic allocation in heap memory using Fortran 90/95:
integer,dimension(:),allocatable::p2i
integer::size
integer::alloc_stat
read(some_file,some_format)size
allocate(p2i(1:size),stat=alloc_stat)
if(alloc_stat.ne.0)stop"error allocating p2i"
...
deallocate(p2i,stat=alloc_stat)
if(alloc_stat.ne.0)stop"error deallocating p2i"
If you want to call a subroutine to allocate p2i, return from that
subroutine, use p2i elsewhere, then call another subroutine to deallocate
p2i, you will need to declare p2 |
|
t****t 发帖数: 6806 | 2 1. you have to allocate memory for mygem, and have to do it in main (
otherwise the allocated address can't be passed back per your function
signature)
2. you don't have to allocate memory for array (mygem->quad). you do have to
allocate memory for pointer (mygem->vertex). |
|
c**0 发帖数: 535 | 3 Personally, I think:
The biggest difference is stack vs. heap. #1 allocates the object in stack
while #2 allocates the object in heap, via "new"...
...by doing so, you unleash the devil of dynamic memory allocation in C++
which has many interesting topics covering different stories of memory/
resource (de)allocation, e.g. new operator vs. operator new, smart pointers,
etc. |
|
t****t 发帖数: 6806 | 4 there are 2 levels of "allocation": allocation within the process, aka
memory/heap management, corresponding to section 3 of man pages; and
allocation from the OS, aka data segment size increase/decrease and memory
mapping, corresponding to section 2 of man pages.
the first part is a direct mapping of libc API: malloc()-allocate, free()-
release. If in the process of malloc, the heap runs out of space, or some
other condition triggers, the libc will invoke the 2nd part automatically.
this depend |
|
t****t 发帖数: 6806 | 5 我来给你看看真正的例子是怎么写的, 那个街头程序员明显什么都没搞清楚就在那里写
blog.
new, new什么? 有没有括号? 这都是不一样的.
当然C++在这个事情上是不intuitive, 也难怪大家抱怨.
#include
#include
using namespace std;
struct A {
int c[10];
};
struct B {
B() {};
int c[10];
};
int main()
{
/* fill the memory with garbage and release,
* just to show the difference */
int *g=new int[10000];
for (int i=0; i<10000; i++) g[i]=rand();
delete g;
A* a1=new A;
A* a2=new A();
B* b1=new B;
B* b2=new B();
c... 阅读全帖 |
|
F*********k 发帖数: 42 | 6 各位大牛。。
我在看Andrei Alexandrescu的那本 Modern c++ design 的书,有个问题不是很明白,
不知哪位大牛看过给我解答一下。。。
书的第四章 Small-Object Allocation 里边,他设计的程序是不是存在这样一个隐患?
如果次序是这样的话:
allocate obj _aa, _bb, _cc;
deallocate _cc;
deallocate _aa;
new allocation request; // 根据他的code他会使用last deallocate的location,
// 就是 _aa
another new allocation requrest; // 根据他的code,他会使用_aa的下一个 memory
// block,那不是_bb么?我_bb没有
// deallocate啊,这不是overwrite了么?
他给出了书里边... 阅读全帖 |
|
d****n 发帖数: 1637 | 7 献丑了,have fun!
#include
#include
#include
#include
#define IS_WHITE_SPACE(c ) ( isblank((c)))
char * replace_white_space( const char *source, size_t source_len){
size_t used=0, inc=0, allocated=source_len+1;
char *ret= (char *)malloc(sizeof(char)*allocated );
const char *s=source;
while(*s++){
(IS_WHITE_SPACE (*(s-1)))? (inc=3):(inc=1);
if ((used+=inc)>=allocated)
ret=(char *)realloc(ret, sizeof(char)*(alloc... 阅读全帖 |
|
|
S*A 发帖数: 7142 | 9
你自己跑过你这样的测量程序吗,肯定没有吧。我随便看一眼你这段修改过
嵌入汇编就有至少2处影响结果的错误。要不你先改好了先测一下吧。
这个就留给你做功课了。
关于 out of order, 你知道 Intel 内部是翻译成完全不同的 micro code
执行的吧?连 register 都是 remap 过的。 所以你说绝对不会产生 1000
clocks 级别的误差从那里来的,有 Intel 官方的出处吗?
我只是很奇怪你为什么不先修正了你的程序再讨论。
[ssa]$ sudo ./a.out 1 0
allocate mem@0xbb6010
memory lock is enabled.
Please run "sudo chrt -f -p [priority] " to change scheduling policy,
then press any key to continue.
Num of buffers: 1, size of each buffer: 256*8=2048 bytes, repeat 1 times,
testing.....
work... 阅读全帖 |
|
x**l 发帖数: 64 | 10 谢谢你指出错误,匆忙之中修改的,没有测试.
如果你的CPU不支持 rdtscp,请使用这个function
typedef unsigned long long ticks;
static __inline__ ticks getticks(void)
{
unsigned a, d;
asm volatile(
"rdtsc;"
: "=a" (a), "=d" (d)
:
: "memory");
asm volatile("cpuid"
:
:
: "%eax", "%ebx", "%ecx", "%edx");
return ((ticks)a) | (((ticks)d) << 32);
}
你没有用numactl去调用,所以即使修改了代码,结果也不准确。
这是我的sample 输出
$ sudo numactl --physcpubind=3 --membind=0 ./a_i... 阅读全帖 |
|
S*A 发帖数: 7142 | 11 因为我最近在 hack 这个 Pogoplug V4 mobile。我顺便帮
你看了以下。
我从 UBoot 上面去掉了 serial cosole。这个是 dmesg。
时钟初始化是在 12 妙开始, 并不是 Linux 真正启动了 12 妙。
所以走到 systemd 启动也才 3.5 秒钟。注意其中有 USB 硬盘
访问,因为那个 rootfs 是在 USB 上面。仔细看 demsg,去掉
USB 硬盘访问,去掉 SATA 寻找硬盘,去掉 Ethernet 寻找
Link 的时间,剩下初始化应该就在 2 秒钟以内了。这个 3.5
秒钟很多时间是在和 USB storage 的东西相关。你只要
rootfs 不在 USB flash 上面,这些都可以启动的时候不做。
所以 2 秒钟启动应该是可以的,不需要特别多定制。
基本上改改 kernel config 或者启动参数就可以了。
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ ... 阅读全帖 |
|
S*A 发帖数: 7142 | 12 因为我最近在 hack 这个 Pogoplug V4 mobile。我顺便帮
你看了以下。
我从 UBoot 上面去掉了 serial cosole。这个是 dmesg。
时钟初始化是在 12 妙开始, 并不是 Linux 真正启动了 12 妙。
所以走到 systemd 启动也才 3.5 秒钟。注意其中有 USB 硬盘
访问,因为那个 rootfs 是在 USB 上面。仔细看 demsg,去掉
USB 硬盘访问,去掉 SATA 寻找硬盘,去掉 Ethernet 寻找
Link 的时间,剩下初始化应该就在 2 秒钟以内了。这个 3.5
秒钟很多时间是在和 USB storage 的东西相关。你只要
rootfs 不在 USB flash 上面,这些都可以启动的时候不做。
所以 2 秒钟启动应该是可以的,不需要特别多定制。
基本上改改 kernel config 或者启动参数就可以了。
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ ... 阅读全帖 |
|
T********i 发帖数: 2416 | 13 差不多10年前了。C++。彻底的kernel bypass。NUMA, huge TLB,CPU isolation。
当时连靠谱的NUMA allocation机制都找不到。发现最可靠的就是reserve一个huge
page然后根据CPU socket平均分配一下pool。
custom memory allocator。用的最简单的binary。allocate的时候找最接近的2^n空闲
块,如果找不到就在pool里顺序分配一个。free的时候把这个块归还n的list里边。
allocate和free都是个位数指令。理论上内存浪费可能多一倍。实际上没那么多。其实
系统死循环运行,memory usage pattern可以证明是固定的。
我个人经验。这种lock free架构和传统架构是格格不入的。根本没有任何办法能够把
他们整合起来。多核间通信都是invariant message passing。传递的都是指针。这是
硬实时架构,延迟是guaranteed。除非你哪里写错了,那种情况直接主动崩溃是最好的
选择。如果你写对了,消息都是在一个简单的循环队列里边,在消息被擦除前,保... 阅读全帖 |
|
k***g 发帖数: 7244 | 14 呵呵,应付完了考试,也来灌一把:)
首先,institutionalized allocation of authorities在中国不存在,不是因为中国的
宪法规定了中国是一个unitary system. Unitary
system本身也可以是一种institutionalization,也是一种中央与地方权力的分配方式。
更进一步说,unitary 也不一定必然和federalism 相抵触,类似一个mutil-D的分析,中
国可以并行政治的unitary system和经济的federalism。其它的例子譬如爱尔兰。
中国之所以没有instiutionalzed allocation of authorities是因为中国缺乏一个
framework of constitutional order in which the central government can collect
taxes, allocate transfers, and enforce regulations autonomously.
Weingast把中国的durable allocation等 |
|
w*******x 发帖数: 489 | 15 嗯,大家眼光都很敏锐阿。。我查了好一会才发现问题所在(当然原来程序有几百行,
难找一点)
总结一下:
1.) 把allocate函数的参数改成 指针的引用。 allocate(int * & Y) 就可以了。
2.) 把allocate函数的参数改成 指向指针的指针 allocate(int ** Y), 调用的时候
传递指针的地址 &X
3.) 直接返回指针。 |
|
S********a 发帖数: 359 | 16 我有个dataset, 11,570,573个obs, 只有2个变量(pm 和 allndays),想做GAM plot,
下面是R CODE 和 error msg:
> nua4pmv=gam(pm~s(allndays,bs="cr"),data=mydata)
Warning messages:
1: In qr.qy(qrc, t(sml[[i]]$X)) :
Reached total allocation of 8054Mb: see help(memory.size)
2: In qr.qy(qrc, t(sml[[i]]$X)) :
Reached total allocation of 8054Mb: see help(memory.size)
3: In qr.qy(qrc, t(sml[[i]]$X)) :
Reached total allocation of 8054Mb: see help(memory.size)
4: In qr.qy(qrc, t(sml[[i]]$X)) :
Reached total allocation of 8... 阅读全帖 |
|
x*b 发帖数: 5723 | 17 这个月全美的dealer都有Dealer Demo for Macan,我约了今天下午去的Fremont
Porsche。首先还是要赞一下服务态度,可能是因为weekday没什么人,车一早就准备好
了,配置应该至少算中配了,有我必配的大部分Option了,包括不多见的21" wheels所
以也正好感受一下是否会太颠,但是美中不足的是没有Air suspension,所以只能感受
标准车高下的情况了。
先从内饰/空间说起:
走的标准的Porsche风格,做工精良,用料明显比BBA同级车高一档,这个就不多说了。
但是要大赞一下新款的方向盘,918上搬下来的,无论是手感还是Shape都绝佳,我个人
觉得比我所有试过的BMW的或Porsche之前款的方向盘手感都要好,包括好评不断的F30
的M-Sport方向盘。
其次是坐姿,我个人没有感觉到和X3 M-Sport明显的差别,可能是没有air suspension
所以车高固定的情况下座椅高度相差不明显,但是根据网上的数据如果有Air
suspension车身最低的时候座椅高度应该能比X3低近10厘米。不过座椅包裹性依旧的
好,即使不是最好的... 阅读全帖 |
|
y*****l 发帖数: 5997 | 18 11/9 ER
https://research.scottrade.com/research/stocks/secfilings/drawFiling.asp?
docKey=137-000114420410058736-6IM04MBUCS1U6UGMGRICK8K85Q&docFormat=HTM&
formType=8-K/A
Explanatory Note:
On July 7, 2010, China Green Agriculture, Inc. (the “Company”) filed a
Current Report on Form 8-K (the “Report”) with the Securities and Exchange
Commission (the “Commission”), with respect to its acquisition of Beijing
Gufeng Chemical Products Co., Ltd., a company organized under the laws of
the People’s Republ... 阅读全帖 |
|
b********n 发帖数: 38600 | 19 Did China's Devaluation Crush Yellen's Rate Hike Strategy
https://macro-allocation.com/the-yuan-the-fed-august-11-2015/
The Yuan And The Fed
The overnight devaluation of the Yuan by the People’s Bank of China may not
signal a change in the Fed actions this fall. As we suggested here, the Fed
has quietly shifted its interest rate policy from one which primarily seeks
to promote its domestic dual economic mandate (stable U.S. inflation and
maximum employment) to one which primarily seeks to ensure... 阅读全帖 |
|
l****z 发帖数: 29846 | 20 Quintus Cicero Wrote:
So, in general terms;
France can barely transport and has absolutely no hope of maintaining a
force of approx. 3500 men
( 1 Brigade) across a distance roughly equal to a flight from New York City
to Las Vegas without outside help?
This is not due to a 20% allocation of funds for NON combat tasks/equipment
/support etc., its due to to-little being allocated TO the Military overall.
Why? Because France cannot ( and will not) allocate more to the Military
budget becasue its ti... 阅读全帖 |
|
s*******1 发帖数: 16479 | 21 Great
Based what I found from the Kansas GOP website
How are Delegates allocated based on the Caucus vote?
Any candidate who receives over 10% of the vote may win a number of
delegates proportional to the candidate’s share of the votes. Vote totals
and delegate allocation are done separately for each Congressional District
and Statewide. The three national committee members are allocated to the
candidate with the most statewide votes. |
|
l*******z 发帖数: 4276 | 22 Each of the state's 10 congressional districts is allocated 3 delegates.
If a candidate receives a majority of the vote or only 1 candidate receives
20% of the vote, that candidate receives all 3 delegates.
If there are 2 candidates who receive at least 20% of the primary vote, then
the top vote getter will be allocated 2 delegates and the other candidate
will be allocated 1 delegate.
If no candidate receives at least 20% of the vote or more than 2 candidates
receive at least 20% of the vote, th... 阅读全帖 |
|
d***y 发帖数: 2567 | 23 【 以下文字转载自 Stock 讨论区 】
发信人: derry (BaoBei), 信区: Stock
标 题: 你们都弱爆了,看看股神的操作
发信站: BBS 未名空间站 (Tue Oct 18 21:50:52 2016, 美东)
Hillary Clinton Futures Trades Detailed
By Charles R. Babcock
Washington Post Staff Writer
Friday, May 27, 1994; Page A01
Hillary Rodham Clinton was allowed to order 10 cattle futures contracts,
normally a $12,000 investment, in her first commodity trade in 1978 although
she had only $1,000 in her account at the time, according to trade records
the White House released yesterda... 阅读全帖 |
|
|
H******r 发帖数: 2879 | 25 Amount of the Incentive and Funding the PI
Provided that there are sufficient funds available by the FTE allocation and
funds made available from salary savings, the incentive payments will be as
follows:
ANNUAL GRANT AMOUNT
INCENTIVE AMOUNT
$50,000 - $99,999
$2,500
$100,000 - $199,999
$5,000
$200,000 - $299,999
$10,000
$300,000 or greater
$15,000
Total awards are calculated as the sum of direct and indirect costs related
directly to the award. Grants bearing less than 20% indirect cost may not... 阅读全帖 |
|
s******y 发帖数: 28562 | 26 今天我们收到另外一个法考题发来的一个信件,说是众院的一个财政委员会已经通过的
明年的财政案里,对教育部门将大幅削减资金。加上已经实施的sequestration, 总共
削减度达到20%。
有人知道这个是怎么回事么?这个是来真的还是吓吓我们而已?如果真的削减20%,很多
实验室都要关门了吧。
mmediate action requested: Institutions are urged to use the current
congressional recess to express concern with the House Appropriations
Committee decision to cut funding for the Labor-HHS-Education subcommittee,
which includes NIH, by nearly 20 percent in FY 2014.
The House of Representatives Appropriations Committee May 21 formally
approved its su... 阅读全帖 |
|
j******n 发帖数: 1727 | 27 http://news.sciencemag.org/scienceinsider/2013/07/senate-panel-
Senate appropriators yesterday expressed their satisfaction with the status
quo at the National Science Foundation (NSF).
In a bipartisan vote, the Senate Appropriations Committee endorsed a 7.9%
increase for the agency that would boost its 2014 budget to $7.426 billion.
In doing so, it also questioned the value of various initiatives launched by
its former director as well as the wisdom of assigning new responsibilities
to NSF's ed... 阅读全帖 |
|
r***e 发帖数: 10135 | 28 http://higheredprofessor.com/2015/05/11/what-is-the-typical-teaching-load-for-university-faculty/
Now that you have the lingo down, let’s take a look at the standard loads
that faculty teach.
4-4
This is typically the highest teaching load you will find at a college or
university. While many community college instructors will teach a higher 5-5
load, a 4-4 is the highest you tend to find in a four-year institution. A
4-4 load indicates an exclusively teaching assignment and would be most
common... 阅读全帖 |
|
s****t 发帖数: 2454 | 29 price negotiable, $50ea,or pm your offer
有2个coupon,有效期11-13个月,一个2013年11月5号过期,另一个2014年1月5号过期。
每个Coupon相当于两张机票打9折。加航回国航班经常比AA, UA便宜。
具体使用条件如下:
- entitles you to a 10 PERCENT discount on a future booking on aircanada.com
- applies to any flight operated by Air Canada Air Canada ExpressTM or one
of our codeshare partners.
- applies to new bookings on aircanada.com for published fares and cannot be
applied after the booking has been made.
- does not apply on 'multi-city' routings including stopovers ... 阅读全帖 |
|
k*********5 发帖数: 1417 | 30 自己坐加航晚点8小时给的
可以用两次或者一次买两个人的
买中美之间经加拿大的航班还是很合算的
150转了
Promotion Code - 15 PERCENT
Hello XXXXXXXXXX,
We are pleased to offer you this Promotion Code to use on a future booking.
To receive your discount, enter the one time use Promotion Code in the
Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you to a 15 PERCENT discount on a future booking on aircanada.com
- applies to any flight operated by Air Canada, Air Canada Rouge, Air Canada
ExpressTM or one of our co... 阅读全帖 |
|
k*********5 发帖数: 1417 | 31 Promotion Code - 15 PERCENT
ask 100, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
This code
- entitles you to a 15 PERCENT discount on a future booking on aircanada.com
- applies to any flight operated by Air Canada, Air Canada Rouge, Air Canada
ExpressTM or one of our codeshare partners.
- applies to new bookings on aircanada.com for published fares and cannot be
applied after the booking has been made.
- cannot be applied to Flight Pass purchase... 阅读全帖 |
|
k*********5 发帖数: 1417 | 32 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
This code
- entitles you to a 15 PERCENT discount on a future booking on aircanada.com
- applies to any flight operated by Air Canada, Air Canada Rouge, Air Canada
ExpressTM or one of our codeshare partners.
- applies to new bookings on aircanada.com for published fares and cannot be
applied after the booking has been made.
- cannot be applied to Flight Pass purchases... 阅读全帖 |
|
k*********5 发帖数: 1417 | 33 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
This code
- entitles you to a 15 PERCENT discount on a future booking on aircanada.com
- applies to any flight operated by Air Canada, Air Canada Rouge, Air Canada
ExpressTM or one of our codeshare partners.
- applies to new bookings on aircanada.com for published fares and cannot be
applied after the booking has been made.
- cannot be applied to Flight Pass purchases... 阅读全帖 |
|
k*********5 发帖数: 1417 | 34 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
Promotion Code - 15 PERCENT
Hello XXXXXX, We are pleased to offer you this Promotion Code to use on a
future booking. To receive your discount, enter the one time use Promotion
Code in the Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you to a 15 PERCENT discount on a future booking on aircanada.com
- applies to any flight operat... 阅读全帖 |
|
k*********5 发帖数: 1417 | 35 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
The code will work for the part of base air ticket, will not work for the
fee and tax.
Promotion Code - 15 PERCENT
Hello XXXXXX, We are pleased to offer you this Promotion Code to use on a
future booking. To receive your discount, enter the one time use Promotion
Code in the Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you to a ... 阅读全帖 |
|
k*********5 发帖数: 1417 | 36 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
The code will work for the part of base air ticket, will not work for the
fee and tax.
Promotion Code - 15 PERCENT
Hello XXXXXX, We are pleased to offer you this Promotion Code to use on a
future booking. To receive your discount, enter the one time use Promotion
Code in the Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you to a ... 阅读全帖 |
|
k*********5 发帖数: 1417 | 37 Promotion Code - 15 PERCENT
ask 50, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
The code will work for the part of base air ticket, will not work for the
fee and tax.
Promotion Code - 15 PERCENT
Hello XXXXXX, We are pleased to offer you this Promotion Code to use on a
future booking. To receive your discount, enter the one time use Promotion
Code in the Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you to a ... 阅读全帖 |
|
k*********5 发帖数: 1417 | 38 Promotion Code - 15 PERCENT
ask for 40, good for someone who prepare to buy canada airline international
ticket. Can buy two tickets.
The code will work for the part of base air ticket, will not work for the
fee and tax.
Promotion Code - 15 PERCENT
Hello XXXXXX, We are pleased to offer you this Promotion Code to use on a
future booking. To receive your discount, enter the one time use Promotion
Code in the Promotion Code box at aircanada.com when you make your booking.
This code
- entitles you t... 阅读全帖 |
|
t***s 发帖数: 163 | 39 我一定奉陪到底
1. Portfolio management 和 index investing是两回事
Portfolio design讲究的就是asset allocation,确定
asset allocation要看你的投资目的和risk tolerance
投资的目的不是最大化return,而是达成finacial goal(退休)
不根据自身risk tolerance设计portfolio最后在bottom
bail out结果不言而喻了
Portfolio management当然要active management,比如
随着年龄增加降低风险,rebanlance等等
一旦asset allocation确定了,买进asset的时候
就只有一个选择了:index fund
在每一个asset里index fund和activemanaged fund的
比较就不用说了,结论请google
2. market只有一个,即全球的资本市场
包括所有自由交易的stock,bond,Real estate。
如果投资者没有risk tolerance和投资年限的限制。
E |
|
l**********t 发帖数: 5754 | 40 a few things to consider
a) when do you retire/ how stable is your income, and what's the correlation
of your income to the market / do you have any debt, etc.
The closer you are to retirement/ the higher the correlation of your income
to market/the more debt/income ratio, the lower allocation to stocks and
more to bond.
b)do you plan to tactically allocate /rebalancing based on market condition?
if not, you don't need the 10% in cash. but if you do tactically re-allocate
, IMHO, 90% in stock is |
|
l**********t 发帖数: 5754 | 41
just
asset allocation is different from buy & hold. First, the allocation changes
over time conditioning on market condition & your needs; secondly,
rebalancing back to the allocation target to keep the portfolio risk in line
with your tolerance & expectation.
there is no free lunch (except for diversification) -- whatever "hedge" you
are looking for, it will cost more than the expected benefit due to the
insurance premium you paid. |
|
s*******d 发帖数: 126 | 42 yes, cost and asset allocation.
If you are not with Vanguard, who charges a 0.19% fee per year, the next
bunch of best thing (such as fidelity or T Rowe Price), charges 0.7% every
year. This difference in 0.5% is mind boggling crazy. Suppose that one needs
4% of the assets to live on after retirement each year. And let's say that
taxes cuts it down to 3%+. Can you imagine paying an extra 15% (that's 0.5/3
) of your annual living expense to have someone manage your money? that's
two months of liv... 阅读全帖 |
|
l**********t 发帖数: 5754 | 43 target date funds are simplified asset allocation strategies for retirement
saving, ideal for those who don't have the resources to design their own
asset allocation / research managers / rebalance among asset classes, etc.
The strategy assumes a) you will retire around xxxx for fund xxxx. b) you
makes periodical contribution to the fund till retirement. The fund will automatically shift from equity to bond as you approach your retirement age (so a 2040 fund will significant allocation to fixed ... 阅读全帖 |
|
S**C 发帖数: 2964 | 44 I saw your post on M* forum so I know more about you. You have a plan, and
background to be a successful investor, and good earning power. I think you
should not be too concerned on not being able to amass 2M USD inflation
adjusted before retirement. IMO you do not need to be that aggressive to
reach your goal.
Our overall bond percentage roughly equals to our age, someone may recommend
age-10, we decided given the current valuation, and the EU sovereign debt,
we would rather be more conservativ... 阅读全帖 |
|
a*****h 发帖数: 2182 | 45 year to date return -12%.
The current asset allocation is 20% growth, 30% balanced, 30% bond and 20%
cash equivalent. Yes going down even with this kind of allocation.
Should I just change all allocation and future contribution to cash
equivalent? then change it back when stock market goes back? |
|
t***n 发帖数: 546 | 46 1.bond经常分红,按照income tax交税。Stock index你不卖是不会有realized gain的
。Stock index分红非常少,基本不交税。Retirement plan确实以stock为主,但不代
表IRA以stock为主,如果你愿意投入的钱超过IRA等账户的上限而不得不放些在taxable
account里面的时候。你应该分清楚portfolio和account的区别。一个portfolio可以
包含很多account,同一个account里面也可能有属于多个不同portfolio的基金。所以
在同一个portfolio内部,要注意不同account在税上的区别。
2.不知道
3.我认为asset allocation是重要的,而具体选哪几只基金达到这个比例是次要的,只
要expense ratio尽量低。所以希望楼主先定下各种比例,再具体分配各种基金。而不
是先分配基金,然后不管asset allocation。
4.rebalance就是要卖掉赚钱的,买不怎么赚钱的,用来保持asset allocation。你把
赚钱的一卖,就有realized ga... 阅读全帖 |
|
t***n 发帖数: 546 | 47 说index并不是只持有一种index,而是用index来配出自己理想的asset allocation,
并且不停的rebalance。用index是因为fee低,而且一般在那个asset的efficiency
frontier。正真的risk 和return由asset allocation决定。
如果真的坚持固定的asset allocation并且及时rebalance的话,在2000年的internet
泡沫前已经卖了不少到bond了吧。在08年也会卖了不少bond来填股票,到现在股票
index都涨了一倍了吧。
关键要rebalance,这样才能take advantage of各个asset class之间的low
correlation。有涨有跌才能赚钱嘛。 |
|
c*****e 发帖数: 1106 | 48 If I am going to have a single allocation/balanced fund/portfolio, I would
prefer to let a seasoned manager do the allocation for me. The All Asset /
World Allocation category where managers determine the asset class mix at
any given time is one I think it's worth paying for pros.
One I like is PIMCO All Asset. I have learned quite a bit by following its
famed manager Robert Arnott.
but there are a couple of knocks.
1. It has quite a few share classes, some with load while others have pretty
hig... 阅读全帖 |
|
w***n 发帖数: 1519 | 49 Since you have tried in the past to time the market and were not successful,
I suggest you forget about timing the market all together. Switching from
100% bond to 100% equity now is as good as waiting for the market to sell
off in the summer. They are purely just guesswork and personal opinions,
which are often wrong. Market simply doesn't care who you are or what you
think. Anything can happen. I wouldn't be surprised to see a severe
correction in summer as much as I wouldn't be surprised to s... 阅读全帖 |
|
|